Example configuration NginX

Example configuration NginX

The following configuration is a minimum configuration in NginX for using the Agent. Of course, this configuration can be extended and distributed over multiple conf files.

worker_processes  1;
events {
      worker_connections  1024;
}

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

      upstream salureconnect_agent {
            server 127.0.0.1:7070;
      }

      server {
            listen                    80;
            server_name     agent.salureconnect.com;
            return 301 https://$host$request_uri;
      }

      server {
            listen                     443 ssl;
            server_name     agent.salureconnect.com;
            ssl_certificate         c:/nginx/ssl/agent.salureconnect.com-chain.pem;
            ssl_certificate_key     c:/nginx/ssl/agent.salureconnect.com-key.pem;
            
            location / {
                        proxy_http_version       1.1;
                        proxy_pass                                       http://salureconnect_agent;
                        proxy_set_header    Host                            $host;
                        proxy_set_header    X-Real-IP                   $remote_addr;
                        proxy_set_header    Upgrade                    $http_upgrade;
                        proxy_set_header    Connection               "upgrade";
                        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
                        proxy_set_header    X-Forwarded-Proto   $scheme;
            }
      }
}