server { listen 80; listen [::]:80; server_name fripost.org; server_name www.fripost.org; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log info; return 301 https://fripost.org$request_uri; } server { listen 443; listen [::]:443; server_name fripost.org; include conf.d/ssl; # include the intermediate certificate, see # - https://www.ssllabs.com/ssltest/analyze.html?d=fripost.org # - http://nginx.org/en/docs/http/configuring_https_servers.html ssl_certificate /etc/nginx/ssl/fripost.org.chained.pem; ssl_certificate_key /etc/nginx/ssl/fripost.org.key; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log info; location / { try_files $uri $uri/ =404; index index.html; root /var/lib/ikiwiki/public_html/fripost-wiki/website; } location /static/ { alias /var/lib/ikiwiki/public_html/fripost-wiki/static/; expires 30d; } location /material/ { alias /var/www/fripost.org/material/; expires 30d; } location /minutes/ { alias /var/www/fripost.org/minutes/; expires 30d; } location /.well-known/autoconfig/ { alias /var/www/fripost.org/autoconfig/; } location = /ikiwiki.cgi { return 403; } }