403 Forbidden on Rails app w/ Nginx, Passenger
You can check the path of your passenger installation with passenger-config –root and the path of your ruby installation with which ruby then compare with the inserted in nginx.conf.
You can check the path of your passenger installation with passenger-config –root and the path of your ruby installation with which ruby then compare with the inserted in nginx.conf.
What’s happening is that your Application and/or ApplicationSpawners are shutting down due to time-out. To process your new request, Passenger has to startup a new copy of your application, which can take several seconds, even on a fast machine. To fix the issue, there are a few Apache configuration options you can use to keep … Read more
It’s your line here: listen 443 default ssl; change it to: listen 443; ssl on; This I’ll call the old style. Also, that along with proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Url-Scheme $scheme; proxy_redirect off; proxy_max_temp_file_size 0; did the trick for me. I see now i am missing the real IP … Read more
Your rails_env production don’t have required set up,probably missing secret_key_base. Open /etc/nginx/sites-available/default and change the rails_env to development: rails_env production; to rails_env development; If the app is loading it’s not a passenger issue. Production Solution: Enter your app root run: rake secret copy the output go to /yourapp/config/secrets.yml set the production secret_key_base Restart the passenger … Read more
I had almost precisely the same error, and was able to completely fix it simply by running: gem install bundler It’s possible your bundler installation is corrupt or missing – that’s what happened in my case. Note that if the above fails you can try: sudo gem install bundler …but generally you can do it … Read more
There are other (better) ways, described in other answers, to secure your files, but yes it is possible to embed the image in your html. Use the <img> tag this way: <img src=”data:image/gif;base64,xxxxxxxxxxxxx…”> Where the xxxxx… part is a base64 encoding of gif image data.
The word “deployment” can have two meanings depending on the context. You are also confusing the roles of Apache/Nginx with the roles of other components. Historic note: This article was originally written on November 6, 2010, when the Ruby app server ecosystem was limited. I’ve updated this article on March 15 2013 with all the … Read more