Created
February 12, 2016 15:28
-
-
Save juhaelee/6b19abde2e5cd56d3572 to your computer and use it in GitHub Desktop.
nginx.conf
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 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
location = /status { | |
return 200; | |
access_log off; | |
} | |
} | |
server { | |
location / { | |
root /data/www; | |
if ($http_x_forwarded_proto != 'https') { | |
rewrite ^ https://$host$request_uri? permanent; | |
} | |
} | |
location /images/ { | |
root /data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment