Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

log rotation - help Newbie

Status
Not open for further replies.

nrastogi

Programmer
Jul 19, 2002
52
US
Hi guys,

I would like to rotate the Apache Web Server Logs. I am looking to have one log file for each day.

I am on Red Hat Linux 7.3 and used the default installtion of Apache. Hence I am getting 4 logs, one for each week.

Ideally, I would like to create a logfile into a separate directory, other than /etc/httpd/logs directory and then ftp it over to windows box to analyze.

I have searced the web and couldn't find step by step instruction on how to do it.


Thanks a lot in advance for your help.

Regards,
NRastogi
 
The Apache runtime configuration directives ErrorLog and TransferLog can both be placed inside a <VirtualHost> tag.

For each of my hosting clients, I create a user account on the system, and in that user's home directory I create two directories: &quot;html&quot; and &quot;logs&quot;. The DocumentRoot of each client's virtual server is that client's &quot;html&quot; directory, and I use Apache's ErrorLog and TransferLog directives to tell that client's virtual server to log to that client's &quot;logs&quot; directory.

Then I configure logrotate (which is available as part of the RH 7.3 distribution and should have been installed by default) to rotate logs as appropriate. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top