Apache

Moderators: None (Apply to moderate this forum)
Number of threads: 150
Number of posts: 335

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How To customize the log file format of Apache webserver Posted by swap1234 on 2 Aug 2007 at 10:30 PM
Hello,

I want to change default Log file format of the Apache server.
I know the command for it.It is as below..
LogFormat "%t %h %u %m %U %s %b %H %{Referer}i\" \"%{User-Agent}i\" detailedLog
CustomLog logs/access.log detailedLog
But I don't know where to run this command.
Can anybody please help in this context?.
Tell me the steps

Regards,
Swap1234
Report
Re: How To customize the log file format of Apache webserver Posted by zibadian on 2 Aug 2007 at 11:55 PM
: Hello,
:
: I want to change default Log file format of the Apache server.
: I know the command for it.It is as below..
: LogFormat "%t %h %u %m %U %s %b %H %{Referer}i\"
: \"%{User-Agent}i\" detailedLog

: CustomLog logs/access.log detailedLog
: But I don't know where to run this command.
: Can anybody please help in this context?.
: Tell me the steps
:
: Regards,
: Swap1234
:
The log configuration can be set in the server configuration or the virtual host configuration.

source: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog
Report
Re: How To customize the log file format of Apache webserver Posted by swap1234 on 3 Aug 2007 at 3:06 AM
: : Hello,
: :
: : I want to change default Log file format of the Apache server.
: : I know the command for it.It is as below..
: : LogFormat "%t %h %u %m %U %s %b %H %{Referer}i\"
: : \"%{User-Agent}i\" detailedLog

: : CustomLog logs/access.log detailedLog
: : But I don't know where to run this command.
: : Can anybody please help in this context?.
: : Tell me the steps
: :
: : Regards,
: : Swap1234
: :
: The log configuration can be set in the server configuration or the
: virtual host configuration.
:
: source:
: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog

Thank u
But I m not able to understand...
can u please provide me detailed solution step-by-step.....

Regards,
Swap1234

Report
Re: How To customize the log file format of Apache webserver Posted by zibadian on 3 Aug 2007 at 7:32 AM
: : : Hello,
: : :
: : : I want to change default Log file format of the Apache server.
: : : I know the command for it.It is as below..
: : : LogFormat "%t %h %u %m %U %s %b %H %{Referer}i\"
: : : \"%{User-Agent}i\" detailedLog

: : : CustomLog logs/access.log detailedLog
: : : But I don't know where to run this command.
: : : Can anybody please help in this context?.
: : : Tell me the steps
: : :
: : : Regards,
: : : Swap1234
: : :
: : The log configuration can be set in the server configuration or the
: : virtual host configuration.
: :
: : source:
: : http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog
:
: Thank u
: But I m not able to understand...
: can u please provide me detailed solution step-by-step.....
:
: Regards,
: Swap1234
:
:
If you want the custom log to be applied to the entire server then you need to place the LogFormat in your httpd.conf outside of any virtual host definitions.
If you want the custom log to be applied to only one virtual host then you need to place the LogFormat in your httpd.conf inside of the virtual host definition, for which you need that format.
If you want the custom log to be applied to more than one virtual hosts, then you need to place the LogFormat in your httpd.conf inside each of the of the virtual host definition, for which you need that format.
The httpd.conf file is a plain text file in the conf folder, which is located in the installation folder of your apache server.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.