Apache access log eating too much space on server

Hi,

My server’s Apache access log takes almost full storage every day, and because of that, my server is not working properly.

I don’t want to store access logs on my server. Is there any option to disable it?

Thank you.

Hi @chandrutamilnadu

Create a new Apache template (you can copy the current template you are using)
Example if you are using default Apache template:

cd /usr/local/hestia/data/templates/web/apache2/
cp default.tpl default-nolog.tpl
cp default.stpl default-nolog.stpl

Remove or comment the directive CustomLog /var/log/%web_system%/domains/%domain%.log combined from default-nolog.tpl and default-nolog.stpl templates.

Assign the new Apache template default-nolog to your domains and rebuild them (assigning the new template from Web UI to your domain should rebuild the domain automatically).

1 Like

Hi, the new Apache template is not showing in hestiacp how do I assign the new template?

Sorry, I wrote the wrong dir /usr/local/hestia/data/templates/web/apache2/, the right dir for your installation is /usr/local/hestia/data/templates/web/apache2/php-fpm/

cd /usr/local/hestia/data/templates/web/apache2/php-fpm/
cp default.tpl default-nolog.tpl
cp default.stpl default-nolog.stpl

Remove or comment the directive CustomLog /var/log/%web_system%/domains/%domain%.log combined from default-nolog.tpl and default-nolog.stpl templates.

Assign the new Apache template default-nolog to your domains and rebuild them (assigning the new template from Web UI to your domain should rebuild the domain automatically).

1 Like

Thank you! it’s worked.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.