Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch update nginx.conf main_json log format in 130.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jun 9, 2022.

  1. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,487
    Local Time:
    9:22 AM
    Nginx 1.21.x
    MariaDB 10.x
    update nginx.conf main_json log format in 130.00beta01

    - update main_json log format in nginx.conf for additional Cloudflare headers
    - add to Nginx vhosts an additional Nginx access.json log file which records Nginx access requests in JSON logging format for easier parsing. It's commented out by default, but can be uncommented by removing hash # from the access_log line to enable addtional access logging in JSON format
    - examples at https://community.centminmod.com/threads/how-to-configure-nginx-for-json-based-access-logging.19641/

    Updated example Nginx vhost below for relevant access_log lines

    access_log /home/nginx/domains/domain.com/log/access.log $NGX_LOGFORMAT buffer=256k flush=5m;
    #access_log /home/nginx/domains/domain.com/log/access.json main_json buffer=256k flush=5m;

    Continue reading...


    130.00beta01 branch