I am running rails 3.1 in development mode on Ubuntu with sqlite. The rails server runs on port 3000, and I have nginx installed for proxy_pass ports 80 and 443 to port 3000. When I put config.force_ssl = true
in my Application.rb and restart the rails server, I get an error that looks like this:
Secure Connection Failed An error occurred during a connection to localhost:3000. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long) The page you are trying to view can not be shown because the authenticity of the received data could not be verified. Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.
When I return to config.force_ssl = false
and restart the rails server, I still get the error message [2011-12-30 09:48:02] ERROR bad URI 9W\x0Fe h=9 ݔ| # ) /6\x00\x00H\x00 '
. in the rail console. This disappears and everything returns to normal if I also clear my browser cache. But how do I get force_ssl = true
to work?
Here is part of my .rb application:
module Regi class Application < Rails::Application
And here is my / etc / nginx / sites -enabled / default:
server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6 root /usr/share/nginx/www; index index.html index.htm; # Make site accessible from http:
Hungry bastard
source share