Turn Off Nginx Access Logs for All Domains

Hello everyone,I am looking for a way to globally disable access logs for nginx across all domains or for a specific template in hestia. The reason for this request is that I am experiencing a significant increase in log file size, with daily increments of approximately 50 MB, which is also impacting performance.If anyone has insights or methods to achieve this, I would greatly appreciate your assistance.Thank you!

Hi @erdiritru

If you are using only Nginx (not Nginx + Apache2) you can comment the directive access_log for the template/templates you are using and rebuild the web domain.

Let’s say you are using default Nginx template, your user is erdiritru and your domain is example.net

sed -i '/^\s*access_log/ s/access_log/#access_log/' /usr/local/hestia/data/templates/web/nginx/php-fpm/default.*
v-rebuild-web-domain erdiritru example.net yes
1 Like

Perfect, thank you. You are always our lifesaver

1 Like

Maybe adjust logrotate to compress the logs earlier. The logs might be very useful In the future.

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