about summary refs log tree commit diff stats
path: root/tools/nginx.html
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nginx.html')
-rw-r--r--tools/nginx.html27
1 files changed, 26 insertions, 1 deletions
diff --git a/tools/nginx.html b/tools/nginx.html
index 5a2e00c..ef78ecb 100644
--- a/tools/nginx.html
+++ b/tools/nginx.html
@@ -43,6 +43,31 @@
 
         <h2 id="certs">2. Certificates</h2>
 
+        <h3 id="letsencrypt">2.1. Lets encrypt</h3>
+
+        <p>Example of nginx location block on public pmwiki setup;</p>
+
+        <pre>
+        #ACME challenge
+        location ^~ /.well-known {
+              allow all;
+              alias /srv/www/c9-pmwiki/pub/cert/.well-known/;
+              default_type "text/plain";
+              try_files $uri =404;
+        }
+        </pre>
+
+        <p>First run dryrun to test if everything is ok;</p>
+
+        <pre>
+        # certbot certonly --dry-run --email user@mail.org --webroot -w /srv/www/c9-pmwiki/pub/cert/-d c9.root.sx
+        </pre>
+
+        <pre>
+        # certbot certonly --email user@mail.org --webroot -w /srv/www/c9-pmwiki/pub/cert/-d c9.root.sx
+        </pre>
+
+        <h3 id="mancert">2.2. Self certificate</h2>
         <p>Certificates allow a more secure connection. Lets create
         self-signed certificate;</p>
 
@@ -125,7 +150,7 @@
         <pre>
         $ sudo chown nginx:nginx /etc/ssl/keys/nginx.key*
         $ sudo chmod 0600 /etc/ssl/keys/nginx.key*
-	$ sudo chmod 644 /etc/ssl/certs/nginx.cert
+	$ sudo chmod 644 /etc/ssl/certs/nginx.crt
         </pre>
 
         <h2 id="nginxconf">3. Nginx Configuration</h2>