[英]How do I get _url working with reverse proxy? Specifically NGinX with Passenger Standalone
I have an environment setup w/ nginx+passenger standalone. 我有一个独立的环境设置w / nginx + passenger。 I'm just using nginx as a reverse proxy.
我只是使用nginx作为反向代理。 My issue is that if I'm running the site on port 3333, If I use a _url instead of _path like projects_url instead of projects_path, the url comes out like http://99.99.99.99:3333/projects .
我的问题是,如果我在端口3333上运行站点,则如果我使用_url而不是像projects_url而不是projects_path这样的_path,那么该URL就会像http://99.99.99.99:3333/projects一样出现。
How do I get those working correctly and just use the domain? 我如何使它们正常工作并仅使用域? Is there a setting in rails?
滑轨上有设置吗?
I'm using rails 2.3.8 for this particular project and the gem I'm using is using _url everywhere so it would be quite a pain to change all of those to _path. 我正在为此特定项目使用rails 2.3.8,而我使用的gem在所有地方都使用_url,因此将所有这些都更改为_path会很痛苦。
Thank you in advance to anyone who can help. 预先感谢任何可以提供帮助的人。
I figured this out myself. 我自己弄清楚了。 I switched to using a unix socket instead of a tcp/ip port.
我改用unix套接字而不是tcp / ip端口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.