Nginx issue ssl


I have a big problem for transform all website in ssl, indeed i have an error for all browser when i go to my website but i don’t understand why ;(
So i hope that you can help me.

My domain is:

I ran this command: certbot certonly –d

It produced this output:
No problem all cert file generated

My web server is (include version): Nginx

The operating system my web server runs on is (include version): Debian 8

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

This is my config where they are all virtualhost but i have listed only 1 but it is exactly the same.
listen ssl;
listen [::]:443;


      root /var/www/aerolurcy;
      index index.php;
    # Par défaut les certificats générés avec certbot vont dans /etc/letsencrypt/live/
 # Il faut évidement remplacer le chemin par celui correspondant au domaine
ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;

   # Les protocoles SSL utilisés
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

 # Activer le ciphers et mettre ceux autorisés (je vous laisse faire de plus amples        recherches pour ça ;) ) 
  ssl_prefer_server_ciphers on;

 ssl_session_cache shared:SSL:10m;
 ssl_session_timeout 10m;

ssl_dhparam /etc/nginx/dhparam.pem;

     location / {
     try_files $uri $uri/ /index.php?$args;

    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;}


What errors are you seeing? The certificate setup looks good, so I’m guessing it’s probably a mixed content issue, but is failing to run those tests, possibly due to a broken redirect.

1 Like

thanks for your answer.
I have this error in firefox: SSL_ERROR_BAD_CERT_DOMAIN

I have only a link in http, i will change this tonight for view.

Hi @help,

You got a certificate that only covers, not These are separate names. They can both be covered by the same certificate, but you need to request both as part of that certificate.

You can add an additional -d option when running Certbot, like -d -d

Right now your certificate is correctly configured on, but the web server returns a redirect to, which is not a name that your certificate applies to. That’s the reason for the browser error.

1 Like

Yes effectively you are right thanks you very much

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.