summaryrefslogtreecommitdiffstats
path: root/roles/wiki/files
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-12-20 14:13:08 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-12-20 14:13:13 +0100
commitda2572ddb144086034eba1989ae909763e95c680 (patch)
treed3374338793592412ca1b10fb4fc20068a392c4e /roles/wiki/files
parent01e59771866559cc13a58800282617d04cb286a6 (diff)
Use the Let's Encrypt CA for our public certs.
Diffstat (limited to 'roles/wiki/files')
-rw-r--r--roles/wiki/files/etc/nginx/sites-available/website17
-rw-r--r--roles/wiki/files/etc/nginx/sites-available/wiki10
2 files changed, 14 insertions, 13 deletions
diff --git a/roles/wiki/files/etc/nginx/sites-available/website b/roles/wiki/files/etc/nginx/sites-available/website
index 3e32158..2519286 100644
--- a/roles/wiki/files/etc/nginx/sites-available/website
+++ b/roles/wiki/files/etc/nginx/sites-available/website
@@ -5,10 +5,14 @@ server {
server_name fripost.org;
server_name www.fripost.org;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log info;
+ include snippets/acme-challenge.conf;
- return 301 https://fripost.org$request_uri;
+ access_log /var/log/nginx/www.access.log;
+ error_log /var/log/nginx/www.error.log info;
+
+ location / {
+ return 301 https://$host$request_uri;
+ }
}
@@ -16,14 +20,15 @@ server {
listen 443;
listen [::]:443;
- server_name fripost.org;
+ server_name fripost.org;
+ server_name www.fripost.org;
include snippets/ssl.conf;
ssl_certificate /etc/nginx/ssl/www.fripost.org.chained.pem;
ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log info;
+ access_log /var/log/nginx/www.access.log;
+ error_log /var/log/nginx/www.error.log info;
location / {
try_files $uri $uri/ =404;
diff --git a/roles/wiki/files/etc/nginx/sites-available/wiki b/roles/wiki/files/etc/nginx/sites-available/wiki
index 3777b87..2855e07 100644
--- a/roles/wiki/files/etc/nginx/sites-available/wiki
+++ b/roles/wiki/files/etc/nginx/sites-available/wiki
@@ -4,18 +4,14 @@ server {
server_name wiki.fripost.org;
+ include snippets/acme-challenge.conf;
+
access_log /var/log/nginx/wiki.access.log;
error_log /var/log/nginx/wiki.error.log info;
location / {
location ~ ^/website(/.*)?$ { return 302 $scheme://fripost.org$1; }
- try_files $uri $uri/ =404;
- index index.html;
- root /var/lib/ikiwiki/public_html/fripost-wiki;
- }
-
- location = /ikiwiki.cgi {
- return 302 https://$host$request_uri;
+ return 301 https://$host$request_uri;
}
}