httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joakim Back" <joakim.b...@hbg.bonet.se>
Subject ReII: Virtual Hosts
Date Fri, 08 Feb 2002 16:36:17 GMT
Ok, I've gone back to my old settings which works fine:

NameVirtualHost 194.236.236.151
NameVirtualHost 192.168.0.7

<VirtualHost 194.236.236.151 192.168.0.7>
    DocumentRoot /home/domain1/public_html/
    ServerName www.domain1.com
    ServerAlias domain1.com
</VirtualHost>

<VirtualHost 194.236.236.151 192.168.0.7>
    DocumentRoot /home/back/public_html/
    ServerName back.domain1.com
    ServerAlias *.back.domain1.com
</VirtualHost>

<VirtualHost 194.236.236.151 192.168.0.7>
    DocumentRoot /home/back/public_html/
    ServerName www.domain2.mine.nu
    ServerAlias domain2.mine.nu
</VirtualHost>

How do I add the feature to let all users have their own subdomain without messing my old
stuff up?
(the middle VirtualHost is a user, and could/should be replaced by the new Vhost)

I've spent a few hours trying to day, with no luck :[

Best Regards, Joakim Back

----- Original Message ----- 
From: "Joakim Back" <joakim.back@hbg.bonet.se>
To: <users@httpd.apache.org>
Sent: Friday, February 08, 2002 5:51 AM
Subject: Virtual Hosts


Hello!

I'm having problems with virtual hosts and even though I've read much docs and talked to friends
about it.. I can't solve it.
Background is this; I have one domain, lets call it www.domain1.com , and I want www.domain1.com
and domain1.com to point towards /home/domain1/public_html/.
Also, I want all users to have their on subdomain, user.domain1.com, at /home/user/public_html/.
Third thing is that for backwards compability, I want www.domain2.mine.nu to work, as it was
my "domain" for a long time and I've used it at many places.

I've tried many setups, but I can't seem to make it all work. Here's an example:

NameVirtualHost 194.236.236.151
NameVirtualHost 192.168.0.7

<VirtualHost 194.236.236.151 192.168.0.7>
    DocumentRoot /home/domain2/public_html/
    ServerName www.domain2.mine.nu
</VirtualHost>

<VirtualHost 194.236.236.151 192.168.0.7>
    ServerName www.%-3+.domain1.com
    ServerAlias *.%-3+.domain1.com
    VirtualDocumentRoot /home/%-3+/public_html/
</VirtualHost>

<VirtualHost _default_>
    DocumentRoot /home/satansrike/public_html/
</VirtualHost>

problem here is obviously that the first Vhost catches all the requests, which it isn't supposed
to.
If I place the 2nd VHost on top, that one catches all requests (user.domain1.com works, but
not www.domain1.com or domain1.com)

How do I solve this? Help is much appreciated.
UseCanonicalName is off, and works. mod_vhost_alias is running.

Best regards, Joakim Back


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message