diff options
author | Silvino Silva <silvino@bk.ru> | 2017-08-02 01:18:23 +0100 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2017-08-02 01:18:23 +0100 |
commit | c0148601ebe2196375f26572624590cad2751845 (patch) | |
tree | 0f40548a2b5c8eaf9bd99423e21b8baf63b83d65 /tools/nginx.html | |
parent | 5ff68b8c191272fe9c80765fa6ac11c18aee3224 (diff) | |
parent | 65167272a3ba52dc4d032a1c60a9ff030408047d (diff) | |
download | doc-c0148601ebe2196375f26572624590cad2751845.tar.gz |
Merge branch 'r-0.3.1' into develop
Diffstat (limited to 'tools/nginx.html')
-rw-r--r-- | tools/nginx.html | 27 |
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> |