You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nathan Belk <nb...@nitrosecurity.com> on 2010/12/02 16:54:53 UTC

[users@httpd] Sending Apache 2.2 log files to Syslog while using Unbuntu 10.4

I am running into two main problems.  First, only certain messages from
the error log are being sent to syslog.  Syslog will receive the
messages about the server status (startup, shutdown).  However, error
messages dealing with file access errors still show up in the original
file /var/log/apache2/error.log.

I would like to set it up so all logs get sent to syslog.

The other issue I'm having is with the access logs.  I try changing the
path but all access logs are still logged onto the original file
/var/log/apache2/access.log.  When I try changing the path, the new file
will be created but messages are still written to the original access
log file.

Here is a portion of the config file I am working with.  I have tried
making the changes in apache2.conf as well as httpd.conf but nothing
changes with either of these.

ErrorLog syslog:local7
LogLevel info
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\""
combined
CustomLog "/var/log/apache2/myaccesstest.log" combined


I have also tried the custom log directive like this:

CustomLog /var/log/apache2/myaccesstest.log combined

I was able to send the error log to syslog successfully when I tried using Fedora 14 (I was unable to send the access log but I think that is because of my lack of knowledge and I just need to do more research on how to send it correctly) but I also need to be able to successfully send log messages to syslog on unbuntu as well.

My searches do not turn up anything that has helped.  If anyone knows
what I might be doing wrong, I would be very grateful.

Thanks

nrbelk@nitrosecurity.com

This e-mail message and any attachments contain information that is confidential and may be privileged.  If the reader of this e-mail is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please immediately notify us by replying to this message or by sending an email to postmaster@nitrosecurity.com, and destroy all copies of this message and any attachments without reading or disclosing them.  Thank you.


---------------------------------------------------------------------
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] Sending Apache 2.2 log files to Syslog while using Unbuntu 10.4

Posted by Eric Covener <co...@gmail.com>.
On Thu, Dec 2, 2010 at 10:54 AM, Nathan Belk <nb...@nitrosecurity.com> wrote:
> I am running into two main problems.  First, only certain messages from
> the error log are being sent to syslog.  Syslog will receive the
> messages about the server status (startup, shutdown).  However, error
> messages dealing with file access errors still show up in the original
> file /var/log/apache2/error.log.

You configured syslog in the base server then overrid it in a virtualhost.

>
> I would like to set it up so all logs get sent to syslog.

Find all of your ErrorLog directives...

>
> The other issue I'm having is with the access logs.  I try changing the
> path but all access logs are still logged onto the original file
> /var/log/apache2/access.log.  When I try changing the path, the new file
> will be created but messages are still written to the original access
> log file.

Probably the same problem.

>
> Here is a portion of the config file I am working with.  I have tried
> making the changes in apache2.conf as well as httpd.conf but nothing
> changes with either of these.
>
> ErrorLog syslog:local7
> LogLevel info
> LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\""
> combined
> CustomLog "/var/log/apache2/myaccesstest.log" combined

Must be hitting some other virtualhost that you're not editing.  try grep.

-- 
Eric Covener
covener@gmail.com

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