You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sriram Rajan <sr...@hotmail.com> on 2003/07/24 22:05:32 UTC

[users@httpd] A question on virtual hosts

Version: apache 2.0.46
System: Linux

I have a vitual host

<Vitualhost  x.x.x.x>
    Documentroot /home
    ServerName www.myname.edu
    ErrorLog /var/log/default.log
    CustomLog /var/log/error.log

    <directory "/home/*/*/public_html>

        # other directives

    </directory>
</virtualhost>

I want httpd to log requests and errors from "/home/*/*/public_html" to
different files

Can I do this by creating another virtual host ??
The server name has to be the same so whatever I tried doesn't work.
 I am using the NameVirtualHost directive.

Any other way to do it ?

Thanks,
Sriram

---------------------------------------------------------------------
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] A question on virtual hosts

Posted by Sriram Rajan <sr...@hotmail.com>.
Thanks,

I had the document root there as an example.
its actually pointing to /var/www/html

I might follow your post-processing suggestion and try to use it.

Sriram
----- Original Message ----- 
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>
Sent: Thursday, July 24, 2003 3:37 PM
Subject: Re: [users@httpd] A question on virtual hosts


>
> On Thu, 24 Jul 2003, Sriram Rajan wrote:
> > <Vitualhost  x.x.x.x>
> >     Documentroot /home
>
> That DocumentRoot is not a good idea.  You are exposing the home
> directories of all your users directly to the web.  Are you sure that all
> your users are comfortable with that?  Even if they are, there are special
> files in the home directories that probably shouldn't be served (.profile,
> ssh keys, etc).
>
> > I want httpd to log requests and errors from "/home/*/*/public_html" to
> > different files
> >
> > Can I do this by creating another virtual host ??
>
> No.  I suggest that you log to all one file and have a post-processing
> program split it out for you.  That will be the simplest and most
> efficient way to handle it.
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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] A question on virtual hosts

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 24 Jul 2003, Sriram Rajan wrote:
> <Vitualhost  x.x.x.x>
>     Documentroot /home

That DocumentRoot is not a good idea.  You are exposing the home
directories of all your users directly to the web.  Are you sure that all
your users are comfortable with that?  Even if they are, there are special
files in the home directories that probably shouldn't be served (.profile,
ssh keys, etc).

> I want httpd to log requests and errors from "/home/*/*/public_html" to
> different files
>
> Can I do this by creating another virtual host ??

No.  I suggest that you log to all one file and have a post-processing
program split it out for you.  That will be the simplest and most
efficient way to handle it.

Joshua.

---------------------------------------------------------------------
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