[Webinar] Learn how to a build a cloud-first strategyRegister Now


Access Log Question

Posted on 2005-05-10
Medium Priority
Last Modified: 2010-04-20
I have a linux server with the following access / error / ssl log files:


etc. etc.

I have 2 questions:

#1. can I delete these log files safely without damaging the server (in other words, will it rewrite them if I delete them or hurt the system?

#2 - Can I change what is being logged so they do not get so big? Right now the access_log.3 is at 2 gigs.

Question by:foreverdita
LVL 48

Accepted Solution

Tintin earned 1000 total points
ID: 13974221
You can delete any of the files ending in a number.

access_log and error_log will be open and actively being written to (assuming apache is running).

You can save lots of space if you compress rotated files.

Edit /etc/logrotate.conf and uncomment the line

LVL 38

Assisted Solution

wesly_chen earned 1000 total points
ID: 13974609
> 2 - Can I change what is being logged so they do not get so big?
Edit /etc/httpd/conf/httpd.conf    (the path of httpd.conf may vary)
CustomLog  logs/access_log common

This will make you access_log file smaller.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month20 days, 13 hours left to enroll

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question