28 行
766 B
Nginx Configuration File
28 行
766 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
resolver 127.0.0.11 valid=10s;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /prod-api/ {
|
|
set $aixun_gateway http://gateway:8080;
|
|
rewrite ^/prod-api/(.*)$ /$1 break;
|
|
proxy_pass $aixun_gateway;
|
|
proxy_http_version 1.1;
|
|
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_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_buffering off;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
}
|