Last active
June 5, 2016 16:22
-
-
Save hotakasaito/7c6f89a5f298a353e7db to your computer and use it in GitHub Desktop.
ELB+nginx構成でhttpをhttpsにリダイレクトする ref: http://qiita.com/hotakasaito/items/4af48c2afa4c6398abf1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 81; | |
rewrite ^ https://$host$request_uri permanent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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