nginx主要配置文件如下:
说明:1、访问http://localhost/proxy1/1.html 对应的实际访问地址为 http://localhost:8080/proxy1/1.html 2、访问http://localhost/proxy2/1.html 对应的实际访问地址为 http://localhost:8080/1.html 3、访问http://localhost/proxy3/1.html 对应的实际访问地址为 http://localhost:8080/test/1.html 4、访问http://localhost/proxy4/1.html 对应的实际访问地址为 http://localhost:8080/test/1.html这里3、4感觉没有区别。但是通过nginx error日志模式查看到 配置3(proxy3的访问信息如下,截取部份)配置4(proxy4的访问信息如下,截取部份)记录下,有问题请大家指出,谢谢。
转:https://blog.51cto.com/4484453/2153528