 
# 4 worker processes is usually sufficient for a webserver serving
# both static files and passing dynamic requests back to apache, fastcgi or an app server
worker_processes     4;
 
# normally you leave this at the default of 1024
events {
    worker_connections  1024;
}
 

http {
    server {
        listen 6051;
        server_name localhost;
        access_log off;
        error_log /tmp/lightop-nginx-error.log;
        access_log /tmp/lightop-nginx-access.log;

        location / 
        {
            proxy_pass http://127.0.0.1:6050;
            proxy_redirect off;

            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
        
        location = /login_refresh_code
        {
            proxy_pass http://127.0.0.1:6050;
            proxy_pass_request_body off;
            proxy_set_header Content-Length "";
            proxy_set_header X-Original-URI $request_uri;
        }

        include nginx/ws-login.conf;
    }
}
