I have been working towards deploying my rails application, and while there have been some kinks I’ve been able to work through most of them. The latest is quite perplexing, however.
My setup is as follows:
Ruby 1.9/Rails 3.2 App w/Phusion Passenger –> nginx on CentOS 6.2 –> Varnish cache server
Despite config.force_ssl being set to false AND being commented out in the production.rb file, the server is still forcibly redirecting to https (which is not yet functional in my case). The server has been restarted repeatedly via ‘killall nginx’ and ‘/opt/nginx/sbin/nginx’, so the setting should be taking effect.
My first thought was that perhaps the cache server was lagging behind, but this isn’t the case.
What makes this particularly odd, though, is that the application works fine if not put into production mode. If I edit nginx.conf to instead use development mode, the site works flawlessly.
What could be the culprit? I am very much new to this facet of server maintenance and IT so I have no idea.
Turned out that it really was varnish being over-aggressive.