user                    nginx;
worker_processes        auto;
worker_cpu_affinity     auto;
worker_rlimit_nofile    1048576;
worker_shutdown_timeout 10s ;

error_log               /var/log/nginx/error.log warn;
pid                     /var/run/nginx.pid;

events {
    multi_accept        on;
    worker_connections  65536;
    use                 epoll;
}

http {
    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    log_format  main    '{ '
                        '"remote_addr": "$remote_addr", '
                        '"time_iso8601": "$time_iso8601", '
                        '"request_method": "$request_method", '
                        '"scheme": "$scheme", '
                        '"host": "$host", '
                        '"request_uri": "$request_uri", '
                        '"status": $status, '
                        '"body_bytes_sent": $body_bytes_sent, '
                        '"http_referer": "$http_referer", '
                        '"http_user_agent": "$http_user_agent", '
                        '"http_x_forwarded_for": "$http_x_forwarded_for", '
                        '"upstream_addr": "$upstream_addr",'
                        '"upstream_status": $upstream_status,'
                        '"upstream_cache_status": "$upstream_cache_status",'
                        '"upstream_response_time": $upstream_response_time,'
                        '"request_time": $request_time '
                        ' }';
                        
    access_log           /var/log/nginx/access.log  main;

    sendfile             on;
    #tcp_nopush          on;

    keepalive_timeout    65;

    gzip                on;
    server_tokens        off;

    include /etc/nginx/conf.d/*.conf;
}
#include /etc/nginx/tcp.d/*.conf;