nginx的配置问题


我遇到一个需求是把 /html/* 的请求都指向 /index.html ,但是不能用重定向功能

请问在配置文件如何实现呢?谢谢大家

web nginx nginx.conf

t10151 9 years, 4 months ago

这样应该就可以了


 location /html/ {
            proxy_pass         http://127.0.0.1/index.html;
        }

可能 127.0.0.1 根据自己的实际情况需要调整的。

卧底工资还行 answered 9 years, 4 months ago

Your Answer