我有一个rails应用程序运行在乘客独立,这是完美的工作。我正在运行apache,并使用带有反向代理的VirtualHost来服务我的rails应用程序。这个很管用。但是,我的资产不是通过vhost提供的,而是给出了一个代理错误。
我的httpd.conf
<VirtualHost *:80>
ServerName greekpeep_rails.nightowls.co
DocumentRoot /home/railsapps/www/greekpeep/public
ProxyPass / http://127.0.0.1:4000
ProxyPassReverse / http://127.0.0.1:4000
<Directory /home/railsapps/www/greekpeep/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>代理错误
代理错误
代理服务器收到来自上游服务器的无效响应。代理服务器无法处理请求GET /assets/application- 6fc7d25aa72d2a014ae6b36136c2fbfc.css。
原因: DNS查找失败:127.0.0.1:4000资产
注意,127.0.0.1:4000完美地工作,并正确地为资产服务。greekpeep_rails.nightowls.co加载页面,但不加载资产。
发布于 2012-03-29 16:19:45
看起来您在/定义的末尾缺少了一个ProxyPass。
ProxyPass / http://127.0.0.1:4000/
ProxyPassReverse / http://127.0.0.1:4000/https://stackoverflow.com/questions/9929298
复制相似问题