Created
September 6, 2017 11:39
-
-
Save Rovanion/2710d8d5a89571d84452a50342b4e5c3 to your computer and use it in GitHub Desktop.
Nginx-conf for CYD
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 443; | |
server_name cyd.liu.se; | |
include includes/cyd.liu.se-commons; | |
include includes/security; | |
ssl_certificate /etc/ssl/certs/cyd.liu.se.crt; | |
ssl_certificate_key /etc/ssl/private/cyd.liu.se.key; | |
} | |
server { | |
listen 443; | |
server_name www.cyd.liu.se; | |
include includes/cyd.liu.se-commons; | |
include includes/security; | |
ssl_certificate /etc/ssl/private/www.cyd.liu.se.crt; | |
ssl_certificate_key /etc/ssl/private/www.cyd.liu.se.key; | |
} | |
server { | |
listen 80; | |
server_name cyd.liu.se www.cyd.liu.se; | |
rewrite ^ https://cyd.liu.se; | |
} |
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
add_header X-Content-Type-Options nosniff; | |
add_header X-XSS-Protection "1; mode=block"; | |
location ~ ~$ { | |
deny all; | |
} |
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
error_log /var/log/nginx/cyd.liu.se/error.log; | |
access_log /var/log/nginx/cyd.liu.se/access.log; | |
root /srv/cyd.liu.se/_site/; | |
ssl on; | |
gzip on; | |
expires 1h; | |
add_header Pragma public; | |
add_header Cache-Control "public"; | |
include conf.d/ssl.conf; | |
location ~ /klimatdata { | |
root /srv; | |
autoindex on; | |
} | |
location = /status.png { | |
expires 5m; | |
} | |
location ~* \.(?:ico|css|js|gif|jpe?g|png|tga|woff)$ { | |
expires 30d; | |
} | |
location ~ ~$ { | |
deny all; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment