Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

virtualhost set up ?

Status
Not open for further replies.

arago

Technical User
Mar 4, 2003
7
0
0
FR
I am attempting to set up virtual hosts in apache2triad on win xp for local dev but when I
point my browser to my-domain.com I never go to my index.htm file but to htdocs dir.
Here is the httpd set up, could anyone tell me what's wrong with it? Thanks

ServerRoot "C:/apache2triad"

ServerName localhost:80
ServerAdmin admin@localhost
DocumentRoot "C:/apache2triad/htdocs"

NameVirtualHost *

<VirtualHost *>
ServerName my-domain.com
ServerAdmin webmaster@my-domain.com
DocumentRoot "c:/apache2triad/htdocs/ErrorLog "logs/my-domain.com-error_log"
CustomLog logs/my-domain.com-access_log common
</VirtualHost>

I've also taken care of the hosts file with:
127.0.0.1 localhost
127.0.0.1 my-domain.com
 
Hi Arago,

Have a look at this FAQ : faq65-1831

Good Luck


Jakob
 
Hi Jakob,
Thanks for the info but I've solved the problem. After restarting the computer I got the reverse problem I had described here: I did get to my index html page but I could no longer access the server control panel. I added a "default" (first on the list)virtual host:
<VirtualHost *>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot "c:/apache2triad/htdocs"
ErrorLog "logs/error_log"
CustomLog logs/access_log common
</VirtualHost>
restarted windows and it worked. I learned that it is not enough to restart Apache, even after setting default browser's cache content to 0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top