Update nginx conf
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
upstream blog {
|
upstream blog {
|
||||||
server unix:///home/blog/shared/tmp/sockets/puma.sock;
|
server 0.0.0.0:2300;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
|
||||||
server_name dnitza.com;
|
server_name dnitza.com;
|
||||||
|
|
||||||
# ~2 seconds is often enough for most folks to parse HTML/CSS and
|
# ~2 seconds is often enough for most folks to parse HTML/CSS and
|
||||||
@@ -12,7 +11,7 @@ server {
|
|||||||
keepalive_timeout 5;
|
keepalive_timeout 5;
|
||||||
|
|
||||||
# path for static files
|
# path for static files
|
||||||
root /home/blog/public;
|
root /home/blog/current/public;
|
||||||
access_log /home/blog/shared/log/nginx.access.log;
|
access_log /home/blog/shared/log/nginx.access.log;
|
||||||
error_log /home/blog/shared/log/nginx.error.log info;
|
error_log /home/blog/shared/log/nginx.error.log info;
|
||||||
|
|
||||||
@@ -71,4 +70,23 @@ server {
|
|||||||
location = /500.html {
|
location = /500.html {
|
||||||
root /home/blog/current/public;
|
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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user