Use LetsEncrypt.
This commit is contained in:
parent
78c2c2136f
commit
b204bb6c6d
|
@ -0,0 +1,8 @@
|
||||||
|
server_name media.metanohi.name www.media.metanohi.name;
|
||||||
|
|
||||||
|
root /var/www/media.metanohi.name/site;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
|
@ -1,16 +1,19 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
root /var/www/media.metanohi.name/site;
|
include /etc/nginx/snippets/letsencrypt.conf;
|
||||||
|
include /etc/nginx/basics/media.metanohi.name.conf;
|
||||||
index index.html;
|
}
|
||||||
|
|
||||||
server_name media.metanohi.name;
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
location / {
|
listen [::]:443 ssl http2;
|
||||||
# First attempt to serve request as file, then
|
|
||||||
# as directory, then fall back to displaying a 404.
|
ssl_certificate /etc/letsencrypt/live/media.metanohi.name/fullchain.pem;
|
||||||
try_files $uri $uri/ =404;
|
ssl_certificate_key /etc/letsencrypt/live/media.metanohi.name/privkey.pem;
|
||||||
}
|
ssl_trusted_certificate /etc/letsencrypt/live/media.metanohi.name/fullchain.pem;
|
||||||
|
|
||||||
|
include /etc/nginx/snippets/ssl.conf;
|
||||||
|
include /etc/nginx/basics/media.metanohi.name.conf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue