server {
listen 80;
server_name ×××.×××.×××.com;
location / {
try_files $uri $uri/ /index.html;
alias /usr/share/nginx/html/demo/sx-ui/;
index index.html index.htm;
}
location /admin {
try_files $uri $uri/ /admin/index.html;
alias /usr/share/nginx/html/demo/sx-admin-ui/;
index index.html index.htm;
}
location /api/admin/ {
proxy_pass http://172.17.0.1:11117/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
location /api/www/ {
client_max_body_size 100m;
proxy_pass http://172.17.0.1:11116/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
}