server {
server_name aa.hostname.com;
listen 80;
# 首页重定向
location =/ {
rewrite ^/ http://aa.hostname.com/aa/index.html last;
}
# /aa 请求转给后端节点
location /aa {
proxy_pass http://127.0.0.1:20003/;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
# 这个没动
location /assets {
alias /home/user/apps/xx/assets/;
}
# 默认应该是403,安全考虑
location / {
return 403;
}
}
server_name aa.hostname.com;
listen 80;
# 首页重定向
location =/ {
rewrite ^/ http://aa.hostname.com/aa/index.html last;
}
# /aa 请求转给后端节点
location /aa {
proxy_pass http://127.0.0.1:20003/;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
# 这个没动
location /assets {
alias /home/user/apps/xx/assets/;
}
# 默认应该是403,安全考虑
location / {
return 403;
}
}