You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nick Jones <ni...@yahoo.com> on 2005/06/07 13:46:34 UTC

[users@httpd] CustomLog directive in container breaks Apache

Hi (new to this list, my first post)

I'm running 2.0.49 on SLES9. I have my main server
configuration, which works dandy. Then I set up three
virtual hosts: one for the main server, and two for
subdomains that I set up. All three virtual hosts log
to the same access_log and error_log file. I want to
have each virtual host log to it's own file to make it
easier to count my page hits. My <VirtualHost>
directives look like this:

<VirtualHost *:80>
 DocumentRoot /srv/www/htdocs
 ServerName www.mydomain.com
 ServerAlias mydomain.com www.mydomain.com
 ServerAdmin webmaster@mydomain.com
</VirtualHost>
<VirtualHost *:80>
 DocumentRoot /srv/www/host1
 ServerName host1.mydomain.com
 ServerAlias host1.mydomain.com
 ServerAdmin webmaster@mydomain.com
 CustomLog logs/host1_access_log.log combined
</VirtualHost *:80>

*One more <VirtualHost> container exactly the same as
the one before with host2.domain.com*

If I put in the CustomLog directives, then do an
apache2ctl graceful, I get no errors whatsoever, oddly
enough, but the Apache Server doesn't run and my sites
aren't being served. If I comment out or remove the
CustomLog directives, then do an apache2ctl graceful,
I get no errors and the server runs just dandy, but
with all the logs going to the same access_log file.

TIA for any help and insight.

-Nick


		
__________________________________ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

---------------------------------------------------------------------
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] CustomLog directive in container breaks Apache

Posted by Nick Jones <ni...@yahoo.com>.
--- Patrick Donker <li...@webpagina.nu> wrote:
[snip]
> >I get no errors and the server runs just dandy, but
> >with all the logs going to the same access_log
> file.
> >
> >TIA for any help and insight.
> >
> >-Nick
> >
> >  
> >
> 
> Some errorlogs please

Huh. Error logs, what a concept! 

<self depricating humor> 
Thanks Mr. Obvious, guess I never made the connection.
</self depricating humor> 

Turns out the problem was the server trying to write
the logs into the server root directories. Changed
logs/host1_access_log.log in the CustomLog directive
to the full path
(/var/log/apache2/host1_access_log.log) and it works
perfectly now. Thanks for pointing me in the right
direction! :)

-Nick


		
__________________________________ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html

---------------------------------------------------------------------
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] CustomLog directive in container breaks Apache

Posted by Patrick Donker <li...@webpagina.nu>.
Nick Jones wrote:

>Hi (new to this list, my first post)
>
>I'm running 2.0.49 on SLES9. I have my main server
>configuration, which works dandy. Then I set up three
>virtual hosts: one for the main server, and two for
>subdomains that I set up. All three virtual hosts log
>to the same access_log and error_log file. I want to
>have each virtual host log to it's own file to make it
>easier to count my page hits. My <VirtualHost>
>directives look like this:
>
><VirtualHost *:80>
> DocumentRoot /srv/www/htdocs
> ServerName www.mydomain.com
> ServerAlias mydomain.com www.mydomain.com
> ServerAdmin webmaster@mydomain.com
></VirtualHost>
><VirtualHost *:80>
> DocumentRoot /srv/www/host1
> ServerName host1.mydomain.com
> ServerAlias host1.mydomain.com
> ServerAdmin webmaster@mydomain.com
> CustomLog logs/host1_access_log.log combined
></VirtualHost *:80>
>
>*One more <VirtualHost> container exactly the same as
>the one before with host2.domain.com*
>
>If I put in the CustomLog directives, then do an
>apache2ctl graceful, I get no errors whatsoever, oddly
>enough, but the Apache Server doesn't run and my sites
>aren't being served. If I comment out or remove the
>CustomLog directives, then do an apache2ctl graceful,
>I get no errors and the server runs just dandy, but
>with all the logs going to the same access_log file.
>
>TIA for any help and insight.
>
>-Nick
>
>  
>

Some errorlogs please


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