logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problems with vhost!?
Author
jmansa



Joined: 03 Mar 2007
Posts: 1

PostPosted: Sat 03 Mar '07 12:16    Post subject: Problems with vhost!? Reply with quote

I have just installed the xampp package version 1.6.0a with apache 2.2. I am desparetly trying to setup namebased virtual host and have tryid to follow the guide at http://httpd.apache.org/docs/2.2/en/vhosts/name-based.html but with no succes.

Everytime I try to reach the site1 or site 2 from a internet browser by typing the www.site1.com or www.site2.com I allways only gets to the root of the htdocs folder where the xampp administration site is. It seems like it doesnt redirect it to the folders I have told it to do?

My httpd-vhosts file looks like this.

NameVirtualHost *:80

<VirtualHost *:80>
ServerName site1.com
ServerAlias www.site1.com
DocumentRoot C:/Program Files/xampp/htdocs/site1
</VirtualHost>

<VirtualHost *:80>
ServerName site2.com
ServerAlias www.site2.com
DocumentRoot C:/Program Files/xampp/htdocs/site2
</VirtualHost>

Really hopes that somebody can help course its driving me crazy!!!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 07 Mar '07 23:41    Post subject: Reply with quote

If only use the page for testing. You can edit the host file in

C:\Windows\System32\drivers\etc\hosts

add below

Code:

127.0.0.1       site1.com
127.0.0.1       site2.com


this trick works only localy.
Back to top
Willy92



Joined: 10 Feb 2008
Posts: 4

PostPosted: Sun 10 Feb '08 7:17    Post subject: Reply with quote

Try removing the :80 - I found that was what I needed to do with the same package
Back to top


Reply to topic   Topic: Problems with vhost!? View previous topic :: View next topic
Post new topic   Forum Index -> Apache