Created
October 31, 2018 14:59
-
-
Save mkorkmaz/4549975de096220071ec3ffe9b142f4f to your computer and use it in GitHub Desktop.
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; | |
listen [::]:80; | |
root /var/lib/www; | |
server_name _; | |
server_tokens off; | |
more_clear_headers Server; | |
add_header Server "selami/image-server"; | |
location / { | |
rewrite /images/(.*):(\w+)$ /cdn/images/$2/$1 last; | |
try_files $uri $uri/ 404; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/www; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment