Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache assistance for a noob
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
Camon
n00b
n00b


Joined: 27 Aug 2004
Posts: 3

PostPosted: Mon Apr 04, 2005 5:37 am    Post subject: Apache assistance for a noob Reply with quote

ok quickie. im noob.


ok now that the important stuff is out of the way, i am running apache 2 and am trying to set up some vr hosts for my friends sites that i am hosting.

heres some fake info.

url: www.camon.com
document root: /httpd/camon
my friends dir: /stars

what i want is when you go to starz.camon.com it directs you to the dir /stars.

please help if you can. apache.org has not been much help
Back to top
View user's profile Send private message
-=dazza=-
n00b
n00b


Joined: 07 Mar 2004
Posts: 4
Location: Australia

PostPosted: Mon Apr 04, 2005 6:19 am    Post subject: Reply with quote

Hi,

This might help you - taken from http://httpd.apache.org/docs-2.0/vhosts/examples.html

Quote:

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www/example1
ServerName www.example1.com

# Other directives here

</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/example2
ServerName www.example2.org

# Other directives here

</VirtualHost>


Therefore, assuming that DNS entries have been setup pointing www.camon.com and starz.camon.com to the same machine, you would need something like:

Quote:

Listen 80
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /httpd/camon
ServerName www.camon.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /stars
ServerName starz.camon.com

# Other directives here

</VirtualHost>


Hope it helps,

Darryl
_________________
Asus A8N-SLI, AMD64-3500+
1024Mb RAM, nVidia 6600-GT's SLI'ed
Gentoo [ work ], XP [ play ]
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