Click to See Complete Forum and Search --> : Multiple Domains on Apache


nagetech
07-12-2002, 01:25 PM
I have tried to succeed at this for a very long time....and have failed miserably! So I'm hoping you guys can help me out

I'm very very very new to Linux...so go easy on me..and please if yo ucan break things down for me

This is my setup.. I have apache listening to port 85, and it picks up on any address that requests that port

for example:

nat.mine.nu:85
nat.sytes.net:85

They lead to my document root which is /www

First I'd like to make it so that the server will only serve nat.mine.nu:85 the document root..... if someone types in nat.sytes.net:85.....they dont go any where...

Second thing is, I want www6.ps2gaming.net:85 to poing to another folder ...which is /ps2

But no matter what i do to set it up..it points to /www.... and thats not what i want!

I'm behind a Router, singlie IP, DYnamic

What Changes do i have to make to the httpd.conf file so that they are treated as separate domains

if anyone can get this issuse solved for me...I'lll glady give you free web hosting.... I've had long time expericne in web hosting with win2k / IIS...and it has been very successfuly so far.. but linux...very new to me...so im taking my time to learn...

THanks in advance

Golden_Eternity
07-12-2002, 05:56 PM
Something like this should work. Werkz four mi, anyway.

<VirtualHost nat.mine.nu>
DocumentRoot /www
</VirtualHost>

<VirtualHost www6.ps2gaming.net>
DocumentRoot /ps2
</VirtualHost>

chikn
07-12-2002, 05:58 PM
He might should have added that information is configured in the Vhosts.conf file

nagetech
07-12-2002, 06:06 PM
/usr/local/etc/httpd/bin/httpd -d /usr/local/etc/httpd :
[Fri Jul 12 17:59:57 2002] [warn] VirtualHost nat.mine.nu:85 overlaps with VirtualHost www6.ps2gaming.net:85, the first has precedence, perhaps you need a NameVirtualHost directive

and tahts the error i get

chikn
07-12-2002, 07:42 PM
Post your Vhosts.conf file.

Golden_Eternity
07-15-2002, 04:59 PM
is Vhosts.conf part of the 2.0 server?

Golden_Eternity
07-15-2002, 05:01 PM
perhaps you need a NameVirtualHost directive


http://httpd.apache.org/docs/vhosts/name-based.html

Lorithar
07-16-2002, 12:03 AM
chkn, thats not part of the default apache 1.3.x fileset... I have seen it used there, but it was a specialized file ... created by a gui management tool.. (which didn't impress me...)

you need a line that reads
#
# Use name-based virtual hosting.
#
NameVirtualHost *


in your httpd.conf file *before* the virtualhost lines above...

chikn
07-16-2002, 08:24 AM
Originally posted by Lorithar
chkn, thats not part of the default apache 1.3.x fileset... I have seen it used there, but it was a specialized file ... created by a gui management tool.. (which didn't impress me...)

you need a line that reads
#
# Use name-based virtual hosting.
#
NameVirtualHost *


in your httpd.conf file *before* the virtualhost lines above...

Actually It has nothing to dowith a gui tool at all its a standard setup for a few distros (Mandy for one) but we dont know which one hes using as I do see it anywhere in the previous posts. And its a much cleaner setup to have all of your vhosts in one file rather than making an httpd.conf file any bigger than it already is.

nagetech
07-17-2002, 01:14 AM
Guys guys i figured it out RIGHT AFTER I posted here..aint taht something?