36 lines
558 B
Nginx Configuration File
36 lines
558 B
Nginx Configuration File
|
user www www;
|
||
|
worker_processes auto;
|
||
|
error_log /opt/config/logs/nginx/error.log;
|
||
|
pid /tmp/nginx.pid;
|
||
|
|
||
|
events {
|
||
|
worker_connections 4096; ## Default: 1024
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
geo $external {
|
||
|
default 1;
|
||
|
127.0.0.1/32 0;
|
||
|
}
|
||
|
|
||
|
##
|
||
|
# WebSocket proxying
|
||
|
##
|
||
|
map $http_upgrade $connection_upgrade {
|
||
|
default upgrade;
|
||
|
'' close;
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80 default_server;
|
||
|
server_name _;
|
||
|
access_log /opt/config/logs/nginx/access.log;
|
||
|
if ($external) {
|
||
|
return 301 https://$host$request_uri;
|
||
|
}
|
||
|
|
||
|
root /opt/nginx/webroot;
|
||
|
index index.html;
|
||
|
}
|
||
|
}
|