【发布时间】:2017-02-22 23:07:06
【问题描述】:
如何同时使用ProxyPass 和DirectoryIndex?
我有以下规则:
# Index
DirectoryIndex index.html
# Service Endpoint
ProxyPass /endpointA http://127.0.0.1:wxyz/
ProxyPassReverse /endpointA http://127.0.0.1:wxyz/
# Root Endpoint
ProxyPass / http://127.0.0.1:8080/static/
ProxyPassReverse / http://127.0.0.1:8080/static/
预期的行为是,当用户点击/ 的机器时,应该为他们服务127.0.0.1:8080/static/index.html
但是,我从 /static/ 端点收到 404,因为似乎没有尝试加载默认页面;如果我点击,这一切都会正常工作
/index.html
哪个路由我到127.0.0.1:8080/static/index.html
如何让 ProxyPass 和 DirectoryIndex 同时工作,或其他一些配置组合,以便当用户简单地点击
/时,他们会被路由到127.0.0.1:8080/static/index.html而不仅仅是127.0.0.1:8080/static?
【问题讨论】:
标签: apache url-rewriting httpd.conf proxypass