Skip to content

Instantly share code, notes, and snippets.

@juhaelee
Created February 12, 2016 15:28
Show Gist options
  • Save juhaelee/6b19abde2e5cd56d3572 to your computer and use it in GitHub Desktop.
Save juhaelee/6b19abde2e5cd56d3572 to your computer and use it in GitHub Desktop.
nginx.conf
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