Search code examples
ruby-on-railsapachethin

Thin server behind apache, stops working when I update code


I've got a rails app on a thin server as a Windows service that is proxied through Apache server. The app works correctly until I try to upload a new version of the project. Then I get a 502 bad gateway error. I tried restarting all of the services but no luck. It also looks like I can't hit it on port 3000 locally. Here's my apache httpd excerpt:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

<VirtualHost localhost:80>
       ServerName serverName
       DocumentRoot "C:/locationOfAppDir"
       ProxyPass / http://localhost:3000/
       ProxyPassReverse / http://localhost:3000/
       ProxyPreserveHost On
</VirtualHost>

<VirtualHost serverName>
       ServerName serverName
       DocumentRoot "C:/locationOfAppDir"
       ProxyPass / http://localhost:3000/
       ProxyPassReverse / http://localhost:3000/
       ProxyPreserveHost On
</VirtualHost>

Solution

  • Protip to self: run bundle install when you add updated code with new gems.