我想配置apache UserDir与ProxyPass合作,也就是说,希望所有以/~
开头的请求都传递给代理。
首先,我对Rails应用程序的ProxyPass设置如下:
ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001/
并且,现在我想将public_html UserDir设置添加到此。
换句话说,我希望http://example.com/hoge/fuga
的请求转到rails应用,但是http://example.com/~user
的请求引用/home/user1/public_html
目录。
我该怎么做?
答案 0 :(得分:2)
' ave通过在apache配置中添加以下行来解决问题;
ProxyPassMatch ^/~ !
答案 1 :(得分:0)
以下是否有效?
ProxyPass /~ !
ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001/
!
会告诉mod_proxy不要转发从/~