I have a rails app running on passenger standalone, which is working perfectly. I am running apache, and use a VirtualHost with a reverse proxy to serve my rails app. This works. However my assets are not being served through the vhost, but give a proxy error.
My 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>
The proxy error
Proxy Error
The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /assets/application- 6fc7d25aa72d2a014ae6b36136c2fbfc.css.
Reason: DNS lookup failure for: 127.0.0.1:4000assets
Note that 127.0.0.1:4000 works perfectly and is correctly serving the assets. greekpeep_rails.nightowls.co loads the page, but not the assets.
Looks like you are missing a /
at the end of your ProxyPass definitions.
ProxyPass / http://127.0.0.1:4000/
ProxyPassReverse / http://127.0.0.1:4000/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With