Update nginx conf

This commit is contained in:
2023-01-29 21:40:14 +11:00
parent ff2e895945
commit af71f4ebcf

View File

@@ -1,9 +1,8 @@
upstream blog {
server unix:///home/blog/shared/tmp/sockets/puma.sock;
server 0.0.0.0:2300;
}
server {
listen 80;
server_name dnitza.com;
# ~2 seconds is often enough for most folks to parse HTML/CSS and
@@ -12,7 +11,7 @@ server {
keepalive_timeout 5;
# path for static files
root /home/blog/public;
root /home/blog/current/public;
access_log /home/blog/shared/log/nginx.access.log;
error_log /home/blog/shared/log/nginx.error.log info;
@@ -71,4 +70,23 @@ server {
location = /500.html {
root /home/blog/current/public;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/dnitza.com-0002/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/dnitza.com-0002/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = dnitza.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name dnitza.com;
return 404; # managed by Certbot
}