user  nginx;
worker_processes  1;

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

##### mandatory configuration for appsentinels start
load_module /etc/nginx/modules/nginx_ext_auth_module.so;
load_module /etc/nginx/modules/nginx_ext_access_log_module.so;
thread_pool ext_access_log_thread_pool threads=1 max_queue=10000;
###### mandatory configuration for appsentinels end

events {
}


http {
    server {
        listen       9000;
        server_name  front-service;
        
        # Appsentinels config block start
        # This will configure modules to log in transparent mode
        ext_auth_log_server http://onprem-controller:9006;
	ext_stats_server http://onprem-controller:9006;
        # Appsentinels config block end

        location / {
            proxy_http_version 1.1;
            proxy_set_header Connection "keep-alive";
            proxy_pass http://localhost:3000;
        }
    }
}

