Skip to content

Instantly share code, notes, and snippets.

@hotakasaito
Last active June 5, 2016 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotakasaito/7c6f89a5f298a353e7db to your computer and use it in GitHub Desktop.
Save hotakasaito/7c6f89a5f298a353e7db to your computer and use it in GitHub Desktop.
ELB+nginx構成でhttpをhttpsにリダイレクトする ref: http://qiita.com/hotakasaito/items/4af48c2afa4c6398abf1
server {
listen 81;
rewrite ^ https://$host$request_uri permanent;
}
Listen 81
<VirtualHost *:81>
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</ifModule>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment