|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
NameVirtualHost only works within main DNS
Using Windows XP Pro
Apache 2.0.52 I am hosting a website on my own pc at home. I have registered 2 seperate DNS and both are pointing to my IP. The problem I have is this, I can connect to mysite1.com fine but when I try to add mysite2.com it will only work if I place the folder containing this 2nd site within the first site. This is what I added to my httpd.conf NameVirtualHost *:80 <VirtualHost *:80> ServerName www.mysite1.com DocumentRoot "C:/apache2/htdocs/mysite1" </VirtualHost> <VirtualHost *:80> ServerName www.mysite2.com DocumentRoot "C:/apache2/htdocs/mysite2" </VirtualHost> When I try to connect to www.mysite2.com I notice the status bar in I.E. displays www.mysite2.com for a brief moment then it changes to www.mysite1.com/mysite2/ This is why I tried moving the whole mysite2 folder inside the mysite1 folder and now it loads ok. The problem I have with this is that all the links in the 2nd site have the first site stuck before it I hope this makes sense as it's the only way I can think to explain. |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > NameVirtualHost only works within main DNS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|