
user  root;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
error_log  logs/error.log  info;
#error_log  logs/error.log  debug;

#pid        logs/nginx.pid;

dynamic_conf    conf/nginx_dynamic.conf 10;
dynamic_log     logs/error_dynamic.log  info;

events {
    worker_connections  1024;
    worker_timers       1024;
    resolver            192.168.84.254 valid=20s;
    resolver_timeout    10s;
    dynamic_refresh_interval  5m;
}

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

    sendfile        on;

    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;

        location /trace1/ {
            proxy_http_version 1.1;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Connection "";
            proxy_set_header X-NTM-Parentid $ntm_currentid;
            proxy_set_header X-NTM-Currentid $ntm_newid;
            proxy_pass http://127.0.0.1/trace/;
        }

        location /trace/ {
            echo $http_x_ntm_traceid;
            echo $http_x_ntm_currentid;
            echo $http_x_ntm_parentid;
            echo $http_x_ntm_debug;
            echo "trace variables";
            echo $ntm_traceid;
            echo $ntm_currentid;
            echo $ntm_parentid;
            echo $ntm_debug;
        }

        location /event_timer_test/ {
            event_timer_test;
        }

        location /event_resolver_test/ {
            event_resolver_test;
        }

        location /dynamic_resolver_test/ {
            dynamic_resolver_test 192.168.84.4  www.test1.com;
        }

        location /dynamic_conf_test/ {
            dynamic_conf_test;
        }

        location / {
            http_dynamic_test;
        }

        location /map_test/ {
            map_test;
        }

        location /toolkit_misc_test/ {
            toolkit_misc_test;
        }

        location /rbuf_test/ {
            rbuf_test;
        }

        location /poold_test/ {
            poold_test;
        }
    }
}
