Article:
 |
|
Location, Location, Location: Tips for Storing Web Site Files
|
| Subject: |
|
Visiting your virtual sites from another computer |
| Date: |
|
2003-05-18 19:17:44 |
| From: |
|
wkolean
|
|
|
|
Good article! Sometimes, however, you need to check your site on another computer, like a PC, and it doesn't seem to work if you only use 127.0.0.1. If you have a fixed IP address, you can add your IP address to NameVirtualHost:
NameVirtualHost 127.0.0.1 192.168.1.100
and then add your IP address to each VirtualHost:
<VirtualHost test.icalshare.com 192.168.1.100>
...
</VirtualHost>
Finally, if you want to test your site on a PC, edit your HOSTS file, which for Win2000 is in C:\WINNT\SYSTEM32\DRIVERS\ETC
and add:
192.168.1.100 test.icalshare.com
|
Showing messages 1 through 5 of 5.
-
Visiting your virtual sites from another computer
2004-02-17 21:49:47
rmcgonegal
[View]
-
I can't get this to work!!!
2004-04-10 22:34:14
bcamp
[View]
-
I can't get this to work!!!
2009-08-30 14:01:15
TEITCU
[View]
-
Visiting your virtual sites from another computer
2004-01-02 20:51:31
anonymous2
[View]
-
Dynamic DNS also works
2003-05-19 14:25:10
icalshare
[View]
I don't know what version you are using but if I try to add
NameVirtualHost 127.0.0.1 192.168.1.100to httpd.conf, then loading Apache errors out with the message
NameVirtualHost takes one argument, A numeric IP address:port, or the name of a hostIt will load if I take out the localhost IP so it reads
NameVirtualHost 192.168.1.100But then using your recommendation with multiple development sites such as
<VirtualHost test.icalshare.com 192.168.1.100>
...
</VirtualHost>
<VirtualHost test.icalshare2.com 192.168.1.100>
...
</VirtualHost>
produces the error
[warn] VirtualHost 192.168.1.100:80 overlaps with VirtualHost 192.168.1.100:80, the first has precedence, perhaps you need a NameVirtualHost directiveIf I eliminate the IP so it is just name based VirtualHost,
<VirtualHost test.iCalshare.com>then it works fine on my Mac. But not from PCs on the LAN. It's great to run cgi's and Php, but being able to test all this on a local PC would be a huge help.
Do I need to run a DNS server? Bind is on the Mac but I don't know if it really needs a dedicated machine. And it sounds like overkill (I've only got 2 Macs and 2 PCs).
Does anyone know of a solution? A tutorial on intranets would be great.