I am quite new on this, havent install SSL certificates in nginx yet so excuse my ignorance.
I have a certificate from godaddy's but i cant seem to find a way to use it on my linux server (ubuntu 18.04).
I will run through what I have done till now.
Godaddy certificate
In the process to create a SSL certificate first godaddy provides two files one with your SSL certificate key and another with the CSR (not sure what it is).
The you are prompted to download the SSL certificate which is another two files, one which is some sort of bundle and the other is something else (from their website)Copy your SSL certificate file and the certificate bundle file to your Nginx server. both this file is .crt
Router
I have enable any incoming 443 to redirect the traffic to my server.
Server Ubuntu 18.04
I followed their not so helpful tutorials.
https://uk.godaddy.com/help/nginx-install-a-certificate-6722
https://www.godaddy.com/garage/how-to-install-an-ssl-certificate-on-ubuntu-for-nginx/
Edited the nginx config file
/etc/nginx/sites-available/myweb
server {
listen 443;
listen [::]:443;
ssl on;
ssl_certificate_key /etc/nginx/ssl/myweb.key;
ssl_certificate /etc/nginx/ssl/certf.crt;
ssl_certificate /etc/nginx/ssl/b_certf.crt;
root /media/world/myweb/origin;
index index.html index.htm index.nginx-debian.html;
server_name 192.168.0.9 lmyweb.com www.myweb.com;
location / {
try_files $uri $uri/ =404;
}
}
When accessing my website, I get 404 this site cant be reach.
Am I missing something? maybe some enable in Nginx that I dont know about? or maybe im configuring the above in the wrong file?
Any help will be appreciated.
ls /media/world/myweb/origin
. I bet there is no index.html, index.htm, or index.nginx-debian.html file available. Is your browser showing a secure connection? It seems that NGINX is working properly.listen 443 ssl;
NOTssl on;
-ssl on;
is considered deprecated and could go away at any time and should not be used. Secondly, you need a single certificate file containing all the certs in the certification chain; you cannot have multiple ssl_certificate lines, it just doesn't work that way.