Question

WordPress LEMP with Cloudflare - Can't Use Fully encrypted SSL?

So I was struggling to connect my domain to my droplet.

And I found out that the cause is my SSL Setting in Cloudflare that’s set to “Full”.

After changing it to “Flexible”, my domain now works in DigitalOcean.

But setting it to Flexible causes other errors in my site. Mainly the JavaScript in my theme causes “loading chunk failed” and won’t load.

The theme works just fine in my local LEMP stack.

Is the Full SSL setting is not supported in DigitalOcean or is there any other way?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @denislavgavrilov,

Thank you for your reply.

-How did you link your domain to Cloudflare?(in your domain registrar you added the Cloudflare nameservers, in the CloudFlare dashboard you pointed your domain to your droplet IP?)

I changed my Nameserver to cloudflare to add it. Then I add an A record pointing to the droplet’s IP address

-Could you give me your Nginx configuration?(did you configured it to always redirect to 443?)

I follow the official tutorial for my nginx setup:

The setup is:

server {
  listen 443;
  root /home/myname/wp;
  index index.php index.html index.htm index.nginx-debian.html;
  server_name lab.wptips.dev;

  location / {
    #try_files $uri $uri/ =404;
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  }

  location ~ /\.ht {
    deny all;
  }
  
  location = /favicon.ico { log_not_found off; access_log off; }
  location = /robots.txt { log_not_found off; access_log off; allow all; }
  location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
    expires max;
    log_not_found off;
  }

}

-What exact errors are you facing? It could be a good idea to check the Nginx logs and see if you can extract something from there as well.

The error is Error 525 - SSL Handshake Failed. Do I still need to install Let’s Encrypt in DigitalOcean? In my old host, I don’t need to install the SSL and simply use the one from Cloudflare

The domain is https://lab.wptips.dev/. I’m on the process of fixing it so the error might not say 525 when you check it.

I can’t find the log in my /etc/nginx folder. Where is this log?

Thanks

Hey @hrsetyono ,

Ideally, the ‘Full’ encryption method should be working just fine if the SSL configuration on your web server is fine as well.

Could you answer some quick questions in order for me, to try and give a suggestion:

-How did you link your domain to Cloudflare?(in your domain registrar you added the Cloudflare nameservers, in the CloudFlare dashboard you pointed your domain to your droplet IP?)

-Could you give me your Nginx configuration?(did you configured it to always redirect to 443?)

-What exact errors are you facing? It could be a good idea to check the Nginx logs and see if you can extract something from there as well.

I’ll be waiting for your response and let’s hope we work this out. :)

Best regards,