Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2 web sites on 1 server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jowilly
Guru
Guru


Joined: 22 Jun 2002
Posts: 319

PostPosted: Thu Aug 05, 2004 3:03 am    Post subject: 2 web sites on 1 server Reply with quote

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
View user's profile Send private message
gnuageux
Veteran
Veteran


Joined: 17 Apr 2004
Posts: 1201

PostPosted: Thu Aug 05, 2004 6:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Jowilly
Guru
Guru


Joined: 22 Jun 2002
Posts: 319

PostPosted: Thu Aug 05, 2004 1:25 pm    Post subject: Reply with quote

Excellent !

Thanks a lot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum