From acb068b4a5af0654d21c2830655b7c6156a2b845 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 31 May 2015 23:10:53 +0200 Subject: Configure ikiwiki (website + wiki). --- roles/wiki/files/etc/nginx/sites-available/website | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 roles/wiki/files/etc/nginx/sites-available/website (limited to 'roles/wiki/files/etc/nginx/sites-available/website') diff --git a/roles/wiki/files/etc/nginx/sites-available/website b/roles/wiki/files/etc/nginx/sites-available/website new file mode 100644 index 0000000..a4abdce --- /dev/null +++ b/roles/wiki/files/etc/nginx/sites-available/website @@ -0,0 +1,42 @@ +server { + listen 80; + listen [::]:80; + + server_name fripost.org; + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log info; + + return 301 https://$host$request_uri; +} + + +server { + listen 443; + listen [::]:443; + + server_name fripost.org; + + include ssl/config; + # 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/; + } + + location = /ikiwiki.cgi { + return 403; + } +} -- cgit v1.2.3