Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Normal and virtual host |
|
Author |
|
mecheri
Joined: 02 Apr 2014 Posts: 1 Location: France, Paris
|
Posted: Wed 02 Apr '14 16:10 Post subject: Normal and virtual host |
|
|
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: 7364 Location: Germany, Next to Hamburg
|
Posted: Wed 02 Apr '14 16:39 Post subject: |
|
|
As soons you add a vhost the default non vhost vanishes. So you may add another vhost. |
|
Back to top |
|
|
|
|
|
|