109 lines
3.4 KiB
Plaintext
109 lines
3.4 KiB
Plaintext
|
|
#user nobody;
|
|
worker_processes 1;
|
|
|
|
#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 2000M;
|
|
|
|
#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;
|
|
#tcp_nodelay on;
|
|
|
|
#keepalive_timeout 0;
|
|
keepalive_timeout 0;
|
|
client_body_timeout 6000s;
|
|
client_header_timeout 6000s;
|
|
send_timeout 6000s;
|
|
#gzip on;
|
|
|
|
|
|
server {
|
|
listen ${nginxPort};
|
|
server_name localhost;
|
|
client_max_body_size 2000M;
|
|
location /{
|
|
root html;
|
|
try_files $uri $uri/ /index.html;
|
|
index index.html index.htm;
|
|
}
|
|
location /api/ {
|
|
proxy_send_timeout 6000;
|
|
proxy_read_timeout 6000;
|
|
proxy_connect_timeout 6000;
|
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://localhost:${serverPort}/;
|
|
|
|
}
|
|
location /UploadHub {
|
|
proxy_send_timeout 6000;
|
|
proxy_read_timeout 6000;
|
|
proxy_connect_timeout 6000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_buffering off;
|
|
proxy_pass http://localhost:${serverPort}/UploadHub;
|
|
|
|
}
|
|
location /IRaCISData/ {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://localhost:${serverPort}/IRaCISData/;
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root html;
|
|
}
|
|
}
|
|
server {
|
|
listen ${serverPort};
|
|
server_name localhost;
|
|
add_header Cross-Origin-Resource-Policy same-site;
|
|
add_header Cross-Origin-Resource-Policy cross-origin;
|
|
|
|
location / {
|
|
proxy_pass http://localhost:${serverPort}/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_send_timeout 6000;
|
|
proxy_read_timeout 6000;
|
|
proxy_connect_timeout 6000;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
}
|