Learn about Centmin Mod LEMP Stack today
Become a Member

How to change default log files to /var/log/nginx/

Discussion in 'Install & Upgrades or Pre-Install Questions' started by EckyBrazzz, Oct 29, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Local Time:
    4:26 PM
    1.17.x Cluster
    10.3.x Cluster & Redis
    Now all our log files go to
    Code (Text):

    But I need them to be all together in a singel file in
    Code (Text):

    Every time with Lsyncd they get overwritten by the master server on the target servers

    Found it *--exclude log

    But still need the in one log file because I scan them even week and send new bot to the bat bod. Now I have to create for every single domain a bash file and a cronjob
    Last edited: Oct 29, 2019
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    4:26 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    you mean all nginx vhost sites on server log all logs to a single file ? you can setup a separate access_log in nginx vhosts which all post to the same file Module ngx_http_log_module similar to how I setup custom Cloudflare Nginx logging at Cloudflare - Cloudflare custom Nginx logging. Then keep existing access_log in Nginx vhost so 2 logs, one for domain.com/log and one for /var/log/nginx.
    • Informative Informative x 1