61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
upstream portal {
|
|
server 127.0.0.1:18880;
|
|
keepalive 32;
|
|
}
|
|
|
|
server {
|
|
listen 18080;
|
|
server_name _;
|
|
|
|
gzip on;
|
|
gzip_min_length 1k;
|
|
gzip_comp_level 9;
|
|
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
|
gzip_vary on;
|
|
gzip_disable "MSIE [1-6]\.";
|
|
|
|
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;
|
|
|
|
add_header X-Content-Type-Options "nosniff";
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_read_timeout 60s;
|
|
proxy_connect_timeout 5s;
|
|
proxy_send_timeout 30s;
|
|
|
|
proxy_buffering off;
|
|
|
|
location = / {
|
|
rewrite ^ /home permanent;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://portal/;
|
|
}
|
|
|
|
location /assets/ {
|
|
proxy_pass http://portal/assets/;
|
|
expires 30d;
|
|
access_log off;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://portal/api/;
|
|
client_max_body_size 100M;
|
|
}
|
|
|
|
location /dev-api/ {
|
|
proxy_pass http://portal/dev-api/;
|
|
client_max_body_size 100M;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
} |