You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Martin Lomas <ml...@rogers.com> on 2004/08/12 03:10:20 UTC

[users@httpd] Re: Dynamic mass vhosts - can I exclude requests for the main page?

Thanks for helping, Eimis. Could you clarify for me ... I think my setup is
already as you suggest: (all I've changed below is the example.com)

<VirtualHost *>
    ServerName www.example.com
    ServerAdmin martin@example.com
    VirtualDocumentRoot L:/www/%1.1/%1
    CustomLog logs/tsaccess.log vcommon env=!req_img
</VirtualHost>

So, do you mean I need to arrange this differently?

Thanks again,
Martin

> I just got into dynamic mass vhosts because I need to serve many
> subdomains. Inside my Virtual Host section, I have the statement:
>
> VirtualDocumentRoot L:/www/%1.1/%1
>
> It's working great; e.g.: if I need to serve "smith.example.com", all I do
> is put the directory "smith" in L:/www/s/
>
> Question: It seems my main page (www.example.com) must also now be served
> from L:/www/w/www - I wish I could have it elsewhere. Is there a way to do
> this (without confusing things too much!)?

Try defining it as first virtual host in your vhost list and then after
defining www.your.domain.com as virtual host add directives for mass virtual
hosting
-----
Eimis


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Dynamic mass vhosts - can I exclude requests for the main page?

Posted by Eimantas Vaiciunas <ei...@sc.vu.lt>.
On Thursday 12 August 2004 04:10, Martin Lomas wrote:
> Thanks for helping, Eimis. Could you clarify for me ... I think my setup is
> already as you suggest: (all I've changed below is the example.com)
>
> <VirtualHost *>
>     ServerName www.example.com
>     ServerAdmin martin@example.com
>     VirtualDocumentRoot L:/www/%1.1/%1
>     CustomLog logs/tsaccess.log vcommon env=!req_img
> </VirtualHost>
>
> So, do you mean I need to arrange this differently?
>
> Thanks again,
> Martin
This is not exactly what i ment. What i ment was:
====
<VirtualHost *>
    ServerName www.example.com
    ServerAdmin martin@example.com
    DocumentRoot L:/anywhere/htdocs/
    CustomLog logs/tsaccess.log vcommon env=!req_img
</VirtualHost>

# And now we add mass virtual hosting

<VirtualHost *>
  DoTheMassVirtualHostingStuff   
</VirtualHost>
====
Another solution to your mass virtual hosting could be dynamic vhosts using 
mod_rewrite. Check the documentation @ http://httpd.apache.org/docs-2.0/
vhosts/mass.html
-----
Eimis


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org