I tried to modify like it says here.
When I run nano /etc/nginx/sites-available/noncodeur.com.conf
server {
listen 80;
listen [::]:80;
server_name noncodeur.com;
root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
It is now:
server {
listen 80;
listen [::]:80;
server_name noncodeur.com;
root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
location / {
return 301 https://noncodeur.com$request_uri;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
And with nano /etc/nginx/sites-available/noncodeur.com-ssl.conf
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name noncodeur.com;
root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
ssl_certificate /etc/letsencrypt/noncodeur.com/fullchain.cer;
ssl_certificate_key /etc/letsencrypt/noncodeur.com/noncodeur.com.key;
include /etc/nginx/snippets/ssl-params.conf;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
It is now:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name noncodeur.com;
root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
ssl_certificate /etc/letsencrypt/noncodeur.com/fullchain.cer;
ssl_certificate_key /etc/letsencrypt/noncodeur.com/noncodeur.com.key;
include /etc/nginx/snippets/ssl-params.conf;
location / {
return 301 https://noncodeur.com$request_uri;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
I then do the last commands (explained here) :
# Get nginx to verify your config
sudo nginx -t
I see:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
And finally:
# Reload nginx with your new config
sudo nginx -s reload
But nothing happens with the last command… No reload or anything…