Skip to content

Instantly share code, notes, and snippets.

@kazuph
Created July 16, 2014 10:34
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 kazuph/08ec26e04affb47217de to your computer and use it in GitHub Desktop.
Save kazuph/08ec26e04affb47217de to your computer and use it in GitHub Desktop.
nginx+ELBでhttps/http毎に行う処理を変えたい ref: http://qiita.com/kazuph/items/73777454375e6e4c235f
location = / {
+ if ($http_x_forwarded_proto = "https") {
+ rewrite ^(.*) http://$server_name$1
+ break;
+ }
...
}
location / {
+ if ($http_x_forwarded_proto != "https") {
+ rewrite ^(.*) https://$server_name$1
+ break;
+ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment