View previous topic :: View next topic |
Author |
Message |
Jowilly Guru
Joined: 22 Jun 2002 Posts: 319
|
Posted: Thu Aug 05, 2004 3:03 am Post subject: 2 web sites on 1 server |
|
|
Hi,
I want to host 2 websites (2 domains) on 1 server (running apache2).
How do I do that ?
I guess I have to make 1 dir for each site:
/var/www/localhost/site1
/var/www/localhost/site2
and put the content in it.
But how do I configure apache ?
And how to do it so that IP1 is resolved and goes to /var/www/localhost/site1 and IP2 to /var/www/localhost/site2 ?
Do I have to setup a DNS ?
Please help.
Thanks. |
|
Back to top |
|
|
gnuageux Veteran
Joined: 17 Apr 2004 Posts: 1201
|
Posted: Thu Aug 05, 2004 6:54 am Post subject: |
|
|
as far as DNS it should point to the same IP, the ip of your webserver obviously. (the a and or www records for each site).
Apache will answer and respond with the appropriate site based on the directive 'virtual host' in your httpd.conf file. Check this out:
http://httpd.apache.org/docs/vhosts/name-based.html
Hope this helps. _________________ The realOTW: http://forums.realotw.org/index.php
Registered Linux user#364538 |
|
Back to top |
|
|
Jowilly Guru
Joined: 22 Jun 2002 Posts: 319
|
Posted: Thu Aug 05, 2004 1:25 pm Post subject: |
|
|
Excellent !
Thanks a lot. |
|
Back to top |
|
|
|