nginx配置访问1731610198081IOCPCALL时访问1731610198081IOCPCALLindexhtml访问其它页面全都跳转到访问17316101118081上
你可以在nginx的配置文件中添加以下内容来实现这个需求:
server {
listen 8081;
location /IOCPCALL/ {
proxy_pass http://173.16.101.9:8081/IOCPCALL/index.html;
}
location / {
proxy_pass http://173.16.101.11:8081;
}
}
这个配置中,我们定义了两个location块。第一个location块匹配以/IOCPCALL/开头的URL,并将请求代理到http://173.16.101.9:8081/IOCPCALL/index.html。第二个location块匹配所有其他URL,并将请求代理到http://173.16.101.11:8081。
确保将上述配置添加到nginx的配置文件中,并重新加载nginx配置使其生效。
原文地址: https://www.cveoy.top/t/topic/iwyx 著作权归作者所有。请勿转载和采集!