My domain is: grasp.deals
My web server is (include version): nginx / 1.20.0
The operating system my web server runs on is (include version): Ubuntu 20.04
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know): yes
Due to some issues in packages installed which caused the freezing of the system, I had to re-install Ubuntu from scratch.
in my `/etc/nginx/conf.d/default.conf' file I have :
server {
listen 443 ssl http2 default_server;
server_name grasp.deals;
ssl_certificate /etc/letsencrypt/live/grasp.deals/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/grasp.deals/privkey.pem; # managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/grasp.deals/chain.pem;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
ssl_session_timeout 5m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-
draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD
5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:50m;
access_log /var/log/nginx/grasp.deals.log combined;
add_header Strict-Transport-Security "max-age=31536000";
location = /favicon.ico { access_log off; log_not_found off; }
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /weights {
root /home/raphy/www;
try_files $uri $uri/ =404;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Following is necessary for Websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
I recovered this nginx configuration.
And obviously it gives this error:
raphy@pc:/etc/nginx/conf.d$ sudo nginx -t
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/grasp.deals/fullchain.pem": BIO_new_file()
failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt
/live/grasp.deals/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
So....now I have this problem:
I'm not able to start nginx without the let's encrypt certs, and I'm not able to get the let's encrypts certs, without starting nginx server...
How to solve this problem?