My error_log is now at 40MB. I would like to reduce this file size.

I'm trying to locate the error log so that I can edit and remove content of the file. But that's easier said than done.

In my httpd.conf file, the location of the log file is set to logs/error_log. But I'm not able to locate any folder called logs.

I do have the folder var/log/httpd/, but the largest error_log file is only at 670KB.

So how can I reduce the filesize of my error_log?

Log Rotation

I discovered that Log Rotatio was switched off. So I switched this on and set the size to be about 4MB. But today, the log file was still at 40MB.

Now I have set it to log Weekly and maksimum of 52 files.

But when does this come in effect? When does it create a new log file? It obviously did not do that when I set it to maks 4MB.

  • To find out where is the logs directory, you have to search for the ServeRoot directive, under the ServerRoot you will normally have the logs directory.
  • If you want your changes to take effects, you have to restart the Apache server process every time you change the configuration.
  • You can even specify the full path of the error_log and even a name you like more:

    ErrorLog /var/log/httpd/error_log
    ErrorLog /var/log/httpd/idontlikeerrors_log


A note for whom works with Plesk

Customizable httpd.include per domain

In Plesk each domain has virtual hosts configuration stored in a separate file:


This file is overwritten each time the virtual host configuration is changed, thus any manual alterations made to the file are discarded. To use custom directives or redefine those inserted by Plesk, you need to create the files vhost.conf and/or vhost_ssl.conf with necessary directives in the directory /home/httpd/vhosts//conf/

If any (or both) of these files exist by the time the main configuration file is generated, Plesk inserts the appropriate directive Include /home/httpd/vhosts//conf/vhost.conf or Include /home/httpd/vhosts//conf/vhost_ssl.conf into the HTTP and/or HTTPS virtual host context respectively.

For security reasons, only root can create the vhost.conf and vhost_ssl.conf files.

For the changes to take effect, you need to run the following:

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=

  • Ah, the reset it is. I'm using plesk (not Telnet), so I don't think I have the search option. Should I change path of ErrLog in httpd.conf or in httpd.include ?
    – Steven
    Jan 25 '11 at 11:32
  • @steven I don't know well Plesk (I know apache), but I think it's http.include
    – tmow
    Jan 25 '11 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.