Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 21st, 2012, 04:42 PM
Freejoy Freejoy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 36 Freejoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 50 m 35 sec
Reputation Power: 6
Problem setting up Virtual Hosts on Wampserver

I'm trying to set up Virtual Hosts on Wampserver.

Here's what I have.

In etc file I have this:

::1 localhost
127.0.0.1 localhost
127.0.0.1 mysite

*********************

I have this line uncommented in httpd.conf:

Include conf/extra/httpd-vhosts.conf

*********************

In httpd-vhosts.conf I have this:

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin admin@mysite
ServerName site
ServerAlias www.site
DocumentRoot C:/Windows/HOST/wamp/www/site
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin admin@localhost
ServerName localhost
ServerAlias www.localhost
DocumentRoot "C:/Windows/HOST/wamp/www/"
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>

**********************

When I go to my "inner" IP 192.168.254.2 I get mysite. When I go to localhost I get my Wampserver index page. That seems to be working correctly.

But if I go to http://mysite I get some seach help page from my ISP (http://wind.search-help.net/index.php...). When someone outside my router goes to my "outside" IP http://75.117.202.131 they said they get a virus page. hehehe

What up with this?

When I go to http://mysite I should get mysite, correct? That's what the tutorials I've been reading and listening to say.

When someone outside my router zone goes to my outside IP they should get mysite also, correct?

What could be the matter?

Thank you

Reply With Quote
  #2  
Old June 21st, 2012, 06:28 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,698 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 4 h 54 m 57 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Quote:
Originally Posted by Freejoy
When I go to my "inner" IP 192.168.254.2 I get mysite. When I go to localhost I get my Wampserver index page. That seems to be working correctly.

Yes: 192.168.254.2 = your computer and localhost = your computer. They're both the same place.

Quote:
Originally Posted by Freejoy
But if I go to http://mysite I get some seach help page from my ISP (http://wind.search-help.net/index.php...).

Sounds like "mysite" doesn't exist in DNS. What are you actually using?

Quote:
Originally Posted by Freejoy
When someone outside my router goes to my "outside" IP http://75.117.202.131 they said they get a virus page. hehehe

I don't. I almost get a directory listing of / (but I don't because that's been disallowed so I get a 403 instead).

Quote:
Originally Posted by Freejoy
When I go to http://mysite I should get mysite, correct? That's what the tutorials I've been reading and listening to say.

It depends. "mysite" has to be resolved to some IP address, and apparently your ISP has things set up so that trying to go someplace that doesn't exist sends you to their search page. Normally your browser would tell you that it can't find "mysite".

Quote:
Originally Posted by Freejoy
When someone outside my router zone goes to my outside IP they should get mysite also, correct?

Short answer is yes.

Reply With Quote
  #3  
Old June 21st, 2012, 07:26 PM
Freejoy Freejoy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 36 Freejoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 50 m 35 sec
Reputation Power: 6
Here's my latest development...

Trying to cover all my bases with this in my hosts file:

::1 localhost
127.0.0.1 localhost
127.0.0.1 FOO
127.0.0.1 FOO.com
127.0.0.1 www.FOO.com
127.0.0.1 google.com
127.0.0.1 www.google.com

This is my real unregistered website name. I can't register it until the end of the month when I get some money.

Here's my new settings in my httpd-vhosts.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin admin@FOO.com
ServerName FOO
ServerAlias www.FOO.com
ServerAlias FOO.com
DocumentRoot C:/Windows/HOST/wamp/www/FOO
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>

*********************

I'm thinking it's my hosts.conf file so I've been checking it. Here's a ping check:

C:\Windows\system32>ping FOO

Pinging FOO.Home [184.106.31.186] with 32 bytes of data:
Reply from 184.106.31.186: bytes=32 time=27ms TTL=240
Reply from 184.106.31.186: bytes=32 time=37ms TTL=240
Reply from 184.106.31.186: bytes=32 time=29ms TTL=240
Reply from 184.106.31.186: bytes=32 time=25ms TTL=240

Ping statistics for 184.106.31.186:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 25ms, Maximum = 37ms, Average = 29ms

***************

You can see I have www.google.com in my hosts file but I can still go to Google in my browser. So I think it's something to do with the host file.


Quote:
Yes: 192.168.254.2 = your computer and localhost = your computer. They're both the same place.


Yeah but my IP 192.168.254.2 is suppose to be the same as localhost but I get two different pages. And that is what I want.

Quote:
I don't. I almost get a directory listing of / (but I don't because that's been disallowed so I get a 403 instead).


Does this mean I need to set my folder to a more unrestricted settings. I'll do that and see.


Quote:
It depends. "mysite" has to be resolved to some IP address, and apparently your ISP has things set up so that trying to go someplace that doesn't exist sends you to their search page. Normally your browser would tell you that it can't find "mysite".


I've been following these tutorials:

JLBN - Virtual Hosts on WAMP
http://guides.jlbn.net/setvh/setvh5.html

and this YouTube:

Setting up Virtual Hosts on Wampserver Part 1 of 2
http://www.youtube.com/watch?v=_IjEtqpD23I

They both say I should be able to go to my home page by typing http://FOO in the browser address bar.

I follow it EXACTLY too.

Thanks

Last edited by requinix : June 21st, 2012 at 09:24 PM. Reason: s/original domain name/FOO/g

Reply With Quote
  #4  
Old June 21st, 2012, 08:57 PM
Freejoy Freejoy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 36 Freejoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 50 m 35 sec
Reputation Power: 6
I just wanted to say I fixed this issue. It was something the matter with the hosts.conf file.

I just went here: http://support.microsoft.com/kb/972034

and run the "Fix It" program then put everything I had back in the host file. That fixed it.

Reply With Quote
  #5  
Old June 21st, 2012, 09:25 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,698 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 4 h 54 m 57 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Quote:
Originally Posted by Freejoy
This is my real unregistered website name. I can't register it until the end of the month when I get some money.

Then allow me to contradict what I said earlier: it would be a good idea to not mention exactly what it is in case somebody (or something) finds it and registers it before you can. I've already pulled it out of your post.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Problem setting up Virtual Hosts on Wampserver

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap