chore: update Nginx vhost

This commit is contained in:
Oliver Davies 2022-07-21 21:07:59 +01:00
parent 5270575644
commit 87f7191ebf

View file

@ -391,12 +391,33 @@ map $uri $new_uri {
}
server {
listen 8080;
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name oliverdavies.uk;
ssl_certificate /home/opdavies/.acme.sh/www.oliverdavies.uk/www.oliverdavies.uk.cer;
ssl_certificate_key /home/opdavies/.acme.sh/www.oliverdavies.uk/www.oliverdavies.uk.key;
return 301 $scheme://www.oliverdavies.uk$request_uri;
}
server {
listen 443 ssl;
server_name www.oliverdavies.uk;
root /srv/oliverdavies.uk;
index index.html;
error_page 404 /404.html;
ssl_certificate /home/opdavies/.acme.sh/www.oliverdavies.uk/www.oliverdavies.uk.cer;
ssl_certificate_key /home/opdavies/.acme.sh/www.oliverdavies.uk/www.oliverdavies.uk.key;
location / {
try_files $uri $uri.html $uri/index.html =404;
}