server {
listen 80;
server_name semint.junengcloud.com;
charset utf-8;
# http://semint.junengcloud.com/proxy-fj/otwp/ 访问以 /juneng/release/sem-pc-integration/dist/ 目录作为根目录,注意这里不能使用 root,要使用 alias, root 在 URL 带上 /proxy-fj/otwp/
location /proxy-fj/otwp/ {
alias /juneng/release/sem-pc-integration/dist/;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
# http://semint.junengcloud.com/proxy-fj/otwp/sesp-35010/em/xxx 重写成 http://semint.junengcloud.com/em/xxx
location /proxy-fj/otwp/sesp-35010/em/ {
proxy_pass http://192.168.1.120:8522;
client_max_body_size 30m;
proxy_pass_header User-Agent;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
rewrite ^/proxy-fj/otwp/sesp-35010/(.*)$ /$1 break;
}
# http://semint.junengcloud.com/proxy-fj/otwp/sesp-35010/oauth/xxx 重写成 http://semint.junengcloud.com/oauth/xxx
location /proxy-fj/otwp/sesp-35010/oauth/ {
proxy_pass http://192.168.1.120:8522;
client_max_body_size 30m;
proxy_pass_header User-Agent;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
rewrite ^/proxy-fj/otwp/sesp-35010/(.*)$ /$1 break;
}
}
# https://onlinehall.junengcloud.com/app/spotsell/filerecord/publicdownload?url=/e5747f72bb23d193158d.pdf 重写成
https://onlinehall.junengcloud.com/nethall/app/spotsell/filerecord/publicdownload?url=/e5747f72bb23d193158d.pdf
location /app/spotsell/filerecord/publicdownload {
rewrite ^/(.*)$ /nethall/$1 permanent;
}