nginx配置访问1731610198081IOCPCALL时访问1731610198081IOCPCALLindexhtml访问其它页面全都跳转到访问17316101118081上对应的页面
您可以使用以下nginx配置实现此功能:
server {
listen 8081;
server_name 173.16.101.9;
location /IOCPCALL/ {
rewrite ^/IOCPCALL/(.*)$ /IOCPCALL/index.html last;
}
location / {
proxy_pass http://173.16.101.11:8081;
}
}
这个配置中,当访问 173.16.101.9:8081/IOCPCALL/ 时会重写到 173.16.101.9:8081/IOCPCALL/index.html 页面。而对于其它页面,会通过代理将请求转发到 173.16.101.11:8081 上对应的页面。
原文地址: https://www.cveoy.top/t/topic/iwy8 著作权归作者所有。请勿转载和采集!