systemctl reload nginx
, чтобы изменения применить. server {
listen [::]:80;
listen 0.0.0.0:80;
server_name postal.domayn.ru;
return 301 https://$host$request_uri;
}
server {
listen [::]:443 ssl;
listen 0.0.0.0:443 ssl;
root /opt/postal/app/public;
server_name postal.domayn.ru;
ssl_certificate ssl/postal.cert;
ssl_certificate_key ssl/postal.key;
# Generate using: openssl dhparam 4096 -out /etc/ssl/dhparam.pem
# ssl_dhparam /etc/ssl/dhparam.pem;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_prefer_server_ciphers on;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA512:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:ECDH+AESGCM:ECDH+AES256:DH+AESGCM:DH+AES256:RSA+AESGCM:!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;
location / {
client_max_body_size 50M;
try_files $uri $uri/index.html $uri.html @puma;
}
location /assets {
add_header Cache-Control max-age=3600;
}
location @puma {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://127.0.0.1:5000;
}
}
systemctl restart nginx
. grep -P -re '^[^#].*?root\/var\/www' /etc/nginx
mkdir /etc/nginx/backup_conf
mv /etc/nginx/sites-enabled/* /etc/nginx/backup_conf
ln -fs /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
systemctl restart nginx
grep -P -re '(postal\.(domayn|cert)|5000)' /etc/nginx
grep -re -P '(postal\.(domayn|cert)|5000)' /etc/nginx
ls -la /etc/nginx/sites-available
ls -la /etc/nginx/sites-enabled
grep -Pre 'ssl.+\~\/\.acme.+;$' /etc/nginx
должен помочь.