Passenger Standalone - Force Redirect to SSL

Johan S

I've started to use Elastic Beanstalk with Ruby + Passenger Standalone which seems awesome, however I want to redirect all HTTP to HTTPS, I haven't managed to find any resource at all about this. I've been looking at customizing the nginx.conf.erb but can't really find out what to do.

Note that I already have SSL working, I just need to make all requests redirecting to SSL.

Thanks,

Johan

Corbin
server {
   listen         80;
   server_name    my.domain.com;
   return         301 https://$server_name$request_uri;
}

server {
   listen         443 ssl;
   server_name    my.domain.com;

   [....]
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

force_ssl redirect loop on Rails 4 using CloudFlare SSL

From Dev

SSL with Apache and Passenger

From Dev

Laravel force SSL gives 'This webpage has a redirect loop'

From Dev

Error while adding redirect (301) rule on Cpanel to force ssl

From Dev

How to update ENV variable on Passenger standalone restart

From Dev

passenger start standalone with RAILS_ENV=production

From Dev

Remove index.php, force ssl, and redirect www to non www in .htaccess

From Dev

Passenger standalone restart-app not working after update to 5.0.18

From Dev

Passenger standalone restart-app not working after update to 5.0.18

From Dev

standalone ssl web service in java

From Dev

Force redirect of URL with htaccess

From Dev

Force page refresh on redirect

From Dev

PHP: Force redirect page

From Dev

Force SSL for hosting

From Dev

Force SSL in NodeJS / Bluemix

From Dev

Force SSL on WordPress archives

From Dev

nginx redirect loop with ssl

From Dev

SSL needed on redirect?

From Dev

SSL hostname verification in tyrus standalone client

From Dev

SSL hostname verification in tyrus standalone client

From Dev

Is it possible to run a standalone Tyrus websocket server with SSL?

From Dev

Htaccess redirect query string + force redirect

From Dev

How do I setup ssl on a rails 4 app? (nginx + passenger)

From Dev

HTTPS Force Redirect not working in Wordpress

From Dev

OpenShift and Jekyll Cartridge Force SSL

From Dev

htaccess force ssl for a particular domain

From Dev

htaccess to strip www and force SSL

From Dev

Chrome Bug - Force ALWAYS SSL

From Dev

force SSL connection without read()