user  nginx;
worker_processes  auto;

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


events {
    worker_connections  1024;
}


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

     log_format  main  '$upstream_addr $server_name $remote_addr - $remote_user [$time_local] "$request" "$request_body" $server_addr '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" "$request_time" "$upstream_response_time" "$server_port"';
     log_format  debug '[$time_local] "$upstream_addr" $remote_addr "$http_x_forwarded_for" '
                      '$status $body_bytes_sent "$http_referer" "$request" $server_port '
                      '"$http_user_agent" $sent_http_my_custom_header $request_time $upstream_response_time $request_length "$request_body"  "$http_version" "$http_deviceid" "$http_clientId" "$http_userId" "$http_phoneBrand" "$http_phoneVersion"  "$http_phoneModel" "$http_deviceType"'

    access_log  /var/log/nginx/access.log  main;
    error_log  /var/log/nginx/error.log error;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
    server {
        listen       80;

        location / {
            root  /usr/share/nginx/html/;
            try_files $uri $uri/ /index.html;
            index  index.html index.htm;
            error_page 405 =200 http://$host:80$request_uri;
        }      
}
    include /etc/nginx/conf.d/*.conf;
}
