#user nobody; worker_processes auto; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; client_max_body_size 1500M; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_send_timeout 300; map $http_upgrade $connection_upgrade { default upgrade; '' close; } # Notification service upstream notification-backend { server briefcam-server:7080; } # Video Streaming service upstream video-streaming-backend { server briefcam-server:5010; } # Qlik (Research module) upstream research-backend { server briefcam-server:8090; } # Pro Web Client Servers upstream briefcam-webservices-backend { server briefcam-server; } #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; log_format main '$http_x_forwarded_for - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent "$http_referer" ' '"$http_user_agent"' ; #gzip on; log_format postdata $request_body; # Redirect all http traffic to https (except Processing Gateway that is used by Alerts Processing Server) # BriefCam System using HTTP (not secured) server { listen 80; server_name www.example.com example.com alias research.example.com; location / { rewrite ^ https://$host$request_uri? permanent; } location /VideoProcessingGateway/ { proxy_set_header Host $host; proxy_pass http://briefcam-webservices-backend; } } # BriefCam System using SSL certificate (Recommended) server { listen 443 default_server ssl; server_name www.example.com example.com alias research.example.com; ssl_certificate C:\NGINX\certificates\example.crt; ssl_certificate_key C:\NGINX\certificates\example.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; charset koi8-r; # Notification Service location /signalr { proxy_pass http://notification-backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # Video Streaming location /vsg { rewrite ^/vsg/(.*) /$1 break; proxy_pass http://video-streaming-backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # Qlik (Research module) location /bc/ { proxy_pass http://research-backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 1440m; } # Pro Web Client location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://briefcam-webservices-backend; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }