diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-05-31 23:10:53 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:54:00 +0200 |
commit | acb068b4a5af0654d21c2830655b7c6156a2b845 (patch) | |
tree | e39d16f7bfa6c631271a9a5bf5720fdc0ea9f5ca /roles/wiki/files/etc/nginx/sites-available/website | |
parent | e63885bcc0d46bfe58a32fcfc1d02daae8735929 (diff) |
Configure ikiwiki (website + wiki).
Diffstat (limited to 'roles/wiki/files/etc/nginx/sites-available/website')
-rw-r--r-- | roles/wiki/files/etc/nginx/sites-available/website | 42 |
1 files changed, 42 insertions, 0 deletions
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; + } +} |