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: Normal and virtual host
Author
mecheri



Joined: 02 Apr 2014
Posts: 1
Location: France, Paris

PostPosted: Wed 02 Apr '14 16:10    Post subject: Normal and virtual host Reply with quote

Hi everyone,

I want to run two websites with httpd on my centos machine.

I have configured the first one on the standard apache configuration file (i.e. /etc/httpd/conf/httpd.conf), created the index.html file under /var/www/html/. Give it the URL 'www.main_page.com'


For the second one I have configured it as a virtual-host under the following directory /mywww/ and give it www.vhost.com as URL.


When I test the url www.vhost.com it points, as expected, to /mywww/index.html.
However, when I test www.main_page.com it points also to /mywww/index.html instead of /var/www/html/index.html !!?


The content of the /etc/hosts file:

192.168.122.103 www.main_page.com
192.168.122.103 www.vhost.com


Any idea ?
Back to top
James Blond
Moderator


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

PostPosted: Wed 02 Apr '14 16:39    Post subject: Reply with quote

As soons you add a vhost the default non vhost vanishes. So you may add another vhost.
Back to top


Reply to topic   Topic: Normal and virtual host View previous topic :: View next topic
Post new topic   Forum Index -> Apache