Web Hosting Talk







View Full Version : httpd.conf setup for mass hosting


netserve
05-18-2001, 06:43 PM
I'm playing with mod_vhost_alias at the moment and have got as far as...

www.domain.com being served from /www/docs/domain.com/www/
subdom.domain.com from /www/docs/domain.com/subdom/

via VirtualDocumentRoot /www/docs/%2+/%1
So far so good....

Problem is that if someone enters http://domain.com we're stuck as we'd
normally want it to be served from the www. dir.

I can't work out whether I should be looking at URL rewriting or doing a
redirect ??
Or possibly something easier than that even?

Just as a bonus question :-) What sort of httpd.conf set up to most of the larger hosts tend to use for hosting 100's of domains? ie with respect to the above.

thewebbie
05-18-2001, 07:18 PM
If you have not already check out:

http://httpd.apache.org/docs/vhosts/mass.html
and
http://httpd.apache.org/docs/mod/mod_vhost_alias.html

You can try to link the domain.com to www.domain.com but I think you can use the following rule

VirtualDocumentRoot /www/docs/%1.0.%2.0/%3.0

I have not tried this though!...

netserve
05-19-2001, 07:26 PM
VirtualDocumentRoot /www/docs/%1.0.%2.0/%3.0

That would be fine for a .com as
www.domain.com would be served from

/domain.com/www

But www.domain.co.uk would come from

/co.uk/domain ?

Is that correct or am I missing something?