My domain is: http://staging.simulator-backend.studylink.fr/
My web server is (include version): Nginx 1.10.3
The operating system my web server runs on is (include version): Ubuntu 17.10
My hosting provider, if applicable, is: OVH
I can login to a root shell on my machine (yes or no, or I don’t know): Yes
I successfuly generated a certificate using sudo certbot-auto certonly --nginx on my staging server, it created the certification files at /etc/letsencrypt/live/staging.simulator-backend.studylink.fr/ I then copied those files (fullchain and privkey) onto my application folder and restarted my app.
When I go at http://staging.simulator-backend.studylink.fr/ no certificate is found at all.
When I go at https://51.254.213.17:3001 a valid certificate is found, but it displays NET::ERR_CERT_COMMON_NAME_INVALID
I read on another topic that HTTPS doesn’t work with IP address, domain names must be used. If so, it explains this behavior.
My main provider is AlwaysData, that’s where the domain “studylink.fr” is registered. But the server at 51.254.x.x is under another provider, OVH.
I made a DNS link, using A type from staging.simulator-backend to 51.254.213.17, I believe this should work for both http and https.
If I try to go to https://staging.simulator-backend.studylink.fr/ (secure version) it doesn’t work, connexion refused.
Here is my Nginx configuration:
server {
listen 80;
server_name http://staging.simulator-backend.studylink.fr;
location / {
proxy_pass https://51.254.213.17:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
What did I miss? Thanks for your help.
