Duplication of context in path for a Rails app on TorqueBox with Apache ReverseProxy

删除回忆录丶 提交于 2019-12-06 06:16:11

I don't have an Apache config handy to test but is it that you have a trailing slash in your ProxyPass and ProxyPassReverse but not in your web context in your torquebox.yml?

So instead of

ProxyPass / http://127.0.0.1:8080/torquebox_test_rails_production/
ProxyPassReverse / http://127.0.0.1:8080/torquebox_test_rails_production/

try

ProxyPass / http://127.0.0.1:8080/torquebox_test_rails_production
ProxyPassReverse / http://127.0.0.1:8080/torquebox_test_rails_production

The solution here was that I needed to use root context ("/") with the host definition and then to remove the context out of the mod_proxy configuration.

Therefore, in the end, what worked was the following in config/torquebox.yml:

web:
  context: /
  host: sub.domain.tld

And the following in the httpd mod_proxy section for the virtual host:

<Location />
    ProxyPass http://127.0.0.1:8080/
    ProxyPassReverse http://127.0.0.1:8080/
</Location>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!