server {
listen 80;
server_name localhost;
location / {
root /opt/;
# try_files $uri $uri/ /index.html;
# index index.html index.htm;
}
location /admin {
alias /opt/aiqs-adminnew/;
try_files $uri $uri/ /index.html;
index index.html index.htm;
# rewrite ^/.*/$ / last; # Redirect everything to / (ex index.html) and let the JS router take care of the rest
# rewrite ^([^.]*[^/])$ $1/ permanent; # Force trailing slash
}
location /app {
alias /opt/aiqs-h5old/;
try_files $uri $uri/ /index.html;
index index.html index.htm;
# rewrite ^/.*/$ / last; # Redirect everything to / (ex index.html) and let the JS router take care of the rest
# rewrite ^([^.]*[^/])$ $1/ permanent; # Force trailing slash
}
#转发
location /client {
proxy_pass http://******.****.****.com/;
}
同时页面更改 homepage:"."
增加 # 寻找所有js css