LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-08-2009, 06:22 AM   #1
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Rep: Reputation: 19
Apache - how to change log format in Virtual Hosts ?


Hi all,


I`m using Apache 2.2.9 and for my awstats I would like to change my log format.

I have pasted to /etc/apache2/apache2.conf

Code:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
but it doesnt work for Virtual Hosts.

What should I do ? Each VirtualHost has a separate access and error log.
How can I customize that logs format ?


help...
 
Old 10-08-2009, 08:00 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You need just the keyword combined in the vhost's definition of the logfile:
Code:
CustomLog /path/to/apache/logs/vhost_access.log combined
Regards
 
Old 10-08-2009, 08:42 AM   #3
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by bathory View Post
Hi,

You need just the keyword combined in the vhost's definition of the logfile:
Code:
CustomLog /path/to/apache/logs/vhost_access.log combined
Regards
Thanks its working
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache virtual hosts ramjam Linux - Server 1 09-17-2009 06:15 AM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
apache + virtual hosts bambeklis Linux - Server 2 05-26-2008 03:40 PM
Apache Virtual Hosts dienerk Linux - General 15 10-16-2004 12:46 AM
Apache/Virtual Hosts Help C-Squared Linux - General 9 08-04-2003 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration