After ssl configuration in ubuntu nginx server not connecting from cloudflare

I have rekey the ssl certficate for my new server , configured everything

my ssl certficate is in godaddy and domain in go daddy too. but my hosting is lightsail ubuntu nginx.

server {

[#listen](javascript:void(0):wink: 80 default_server;

[#listen](javascript:void(0):wink: [::]:80 default_server;

SSL configuration

listen 443 ssl default_server;

listen [::]:443 ssl default_server;

ssl on;

ssl_certificate /etc/nginx/ssl/;

ssl_certificate_key /etc/nginx/ssl/;

root /var/www/laravel/laravel-igcse/public;

Add index.php to the list if you are using PHP

index index.php index.html index.htm index.nginx-debian.html;


location / {

First attempt to serve request as file, then

as directory, then fall back to displaying a 404.

[#try_files](javascript:void(0):wink: $uri $uri/ =404;

try_files $uri $uri/ /index.php?$query_string;


location ~ .php$ {

include snippets/fastcgi-php.conf;

fastcgi_pass unix:/run/php/php8.0-fpm.sock;


deny access to .htaccess files, if Apache’s document root

concurs with nginx’s one

[#location](javascript:void(0):wink: ~ /.ht {

deny all;



after this ssl key installation nothing works my site is down. before it works fine.

May I ask what error do you get? (using PHP 8.0 with Nginx)

Before moving to Cloudflare, was your Website working over HTTPS connection?

Is your GoDaddy SSL certificate still valid and does it cover your naked domain + www + mail (or any other related sub-domain)?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

Kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

Furthermore, do not skip below step and kindly re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

I can load your Website fine. I see it’s working good over HTTPS, no error, using Cloudflare nameservers, DNS record(s) are proxied as well.

@igcse.library Could you confirm?

1 Like

Hi Thanks for the Reply ,I have checked in Pro plan I cant apply my own ssl from browser to cloudflare proxy it needs business plan to apply . site works fine applied godaddy certficate for cloudflare to server requests.

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