How to disable Apache and nginx log files for domain/domains




  • Avatar
    Noam Harel


    erasing the files fom domain log files and system folder might work?


  • Avatar
    Nikolay Zhmuk

    @Noam Harel Hello, it is not recommended since it potentially can cause Plesk malfunction. Also, those files will be recreated during DailyMaintenance task execution that includes log rotation.

  • Avatar
    A Sieber (Edited )

    After disabling nginx log-files for a specific domain as described above, nginx will produce many log entries in /var/log/nginx/access.log.

    Before that, only a few entries have been written there. It looks like the log entries are now written to the general log instead of the access.log files in the domains. That's not what I want.




  • Avatar
    Bulat Tsydenov

    @A Sieber, the behavior you are describing is expected because the article describes how to disable logs for domains only. If you want to disable nginx logs at all on the whole server, apply the solution from this article and create `/etc/nginx/conf.d/00_disable_logs.conf` file with the following configuration:

    access_log off;
    error_log off;

    After that, restart nginx service

Please sign in to leave a comment.

Have more questions? Submit a request