You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Josu Lazkano <jo...@barcelonamedia.org> on 2011/07/11 14:02:53 UTC
[users@httpd] vhost names on logs
Hello list, I want to configure a lo system and I need to get the vhost name on the log files to separate them.
Is it possible to do that?
I am using Apache2 on a Ubuntu system, this is my vhost configuration:
ErrorLog /var/log/apache/domain1/error.log
LogLevel warn
CustomLog /var/log/apache/domain1/access.log combined
I have lots of different vhost on the same machine.
Thanks and best regards.
[users@httpd] RE: vhost names on logs
Posted by Josu Lazkano <jo...@barcelonamedia.org>.
Thanks for the reply, I use to separate all logs:
CustomLog /var/log/apache/domain1/access.log combined
CustomLog /var/log/apache/domain2/access.log combined
CustomLog /var/log/apache/domain2/access.log combined
But the problem is that with syslog-ng, on the remote host I have all info on the "user" log file, so I need to separate with vhost_name pattern.
Thanks and best regards.
De: Ashwin Kesavan [mailto:ashwinke@yahoo-inc.com]
Enviado el: lunes, 11 de julio de 2011 15:23
Para: users@httpd.apache.org
Asunto: [users@httpd] RE: vhost names on logs
Hi Josu,
The more easier way which any newbie can do trouble free is to have separate log files for each of the virtual host section and name the log file based on the vhost name. That way you can achieve what you desired. I am not sure if this solves your problem. Post more details on what you want if this doesn't solve your problem.
Hope that helps,
--ashwin
From: Josu Lazkano [mailto:josu.lazkano@barcelonamedia.org]
Sent: Monday, July 11, 2011 5:33 PM
To: users@httpd.apache.org
Subject: [users@httpd] vhost names on logs
Hello list, I want to configure a lo system and I need to get the vhost name on the log files to separate them.
Is it possible to do that?
I am using Apache2 on a Ubuntu system, this is my vhost configuration:
ErrorLog /var/log/apache/domain1/error.log
LogLevel warn
CustomLog /var/log/apache/domain1/access.log combined
I have lots of different vhost on the same machine.
Thanks and best regards.
[users@httpd] RE: vhost names on logs
Posted by Ashwin Kesavan <as...@yahoo-inc.com>.
Hi Josu,
The more easier way which any newbie can do trouble free is to have separate log files for each of the virtual host section and name the log file based on the vhost name. That way you can achieve what you desired. I am not sure if this solves your problem. Post more details on what you want if this doesn't solve your problem.
Hope that helps,
--ashwin
From: Josu Lazkano [mailto:josu.lazkano@barcelonamedia.org]
Sent: Monday, July 11, 2011 5:33 PM
To: users@httpd.apache.org
Subject: [users@httpd] vhost names on logs
Hello list, I want to configure a lo system and I need to get the vhost name on the log files to separate them.
Is it possible to do that?
I am using Apache2 on a Ubuntu system, this is my vhost configuration:
ErrorLog /var/log/apache/domain1/error.log
LogLevel warn
CustomLog /var/log/apache/domain1/access.log combined
I have lots of different vhost on the same machine.
Thanks and best regards.
RE: [users@httpd] vhost names on logs
Posted by Josu Lazkano <jo...@barcelonamedia.org>.
Thanks for the reply, where I must change it? On each vhost configuration or on a global configuration?
Thanks for all your help.
Best regards.
-----Mensaje original-----
De: Eric Covener [mailto:covener@gmail.com]
Enviado el: lunes, 11 de julio de 2011 15:53
Para: users@httpd.apache.org
Asunto: Re: [users@httpd] vhost names on logs
On Mon, Jul 11, 2011 at 8:02 AM, Josu Lazkano
<jo...@barcelonamedia.org> wrote:
> Hello list, I want to configure a lo system and I need to get the vhost name
> on the log files to separate them.
>
See about adding %v and %V
http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
to your LogFormat.
---------------------------------------------------------------------
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] vhost names on logs
Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-11 15:52, Eric Covener wrote:
> On Mon, Jul 11, 2011 at 8:02 AM, Josu Lazkano
> <jo...@barcelonamedia.org> wrote:
>> Hello list, I want to configure a lo system and I need to get the vhost name
>> on the log files to separate them.
>>
> See about adding %v and %V
> http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
> to your LogFormat.
Personally, I use %{HTTP_HOST}e or just %{Host}i in addition to %v/%V.
This tells me what they tried to connect to, as well.
--
J.
---------------------------------------------------------------------
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] vhost names on logs
Posted by Yehuda Katz <ye...@ymkatz.net>.
On Mon, Jul 11, 2011 at 9:52 AM, Eric Covener <co...@gmail.com> wrote:
> On Mon, Jul 11, 2011 at 8:02 AM, Josu Lazkano
> <jo...@barcelonamedia.org> wrote:
> > Hello list, I want to configure a lo system and I need to get the vhost
> name
> > on the log files to separate them.
> >
> See about adding %v and %V
> http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
> to your LogFormat.
>
Apache distributed by Ubuntu usually has the "vhost_combined" log format
already in the config, which should do what you want.
"LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"" vhost_combined"
- Y
Re: [users@httpd] vhost names on logs
Posted by Eric Covener <co...@gmail.com>.
On Mon, Jul 11, 2011 at 8:02 AM, Josu Lazkano
<jo...@barcelonamedia.org> wrote:
> Hello list, I want to configure a lo system and I need to get the vhost name
> on the log files to separate them.
>
See about adding %v and %V
http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
to your LogFormat.
---------------------------------------------------------------------
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