Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
milkerfish

Website in redirect loop after letsencrypt cert.

Recommended Posts

Posted · Original PosterOP

I used certbot to generate an SSL certificate for my site and now it's in a redirect loop, my nginx config is below

server {
root /var/www/imsarah;
index index.php;
server_name imsarah.lgbt www.imsarah.lgbt;

    access_log /var/log/nginx/imsarah.lgbt_access.log;
    error_log /var/log/nginx/imsarah.lgbt_error.log;

    client_max_body_size 64M;
      location = /favicon.ico {
        log_not_found off;
        access_log off;
      }

     location = /robots.txt {
       allow all;
       log_not_found off;
       access_log off;
  }

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

    location ~ \.php$ {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_read_timeout 3600s;
            fastcgi_buffer_size 128k;
            fastcgi_buffers 4 128k;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass unix:/run/php/php7.3-fpm.sock;
            fastcgi_index index.php;
            }
      location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
            expires max;
           log_not_found off;
        }

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/imsarah.lgbt/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/imsarah.lgbt/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

SOLVED: incase anyone was wondering what my issue is I was missing redirect DNS record and had cloudflare SSL enabled when I wanted to use letsencrypt.


Motherboard : ASUS Prime B350-Plus
CPU : AMD Ryzen 5 1600
GPU : AMD RX580 
SSD : Corsair Force MP510 240GB
HDD : 1TB Seagate 7200RPM
RAM : 16GB
Case : Corsair Spec-05
OS : Windows 10 Pro


Steam : https://steamcommunity.com/id/milkerfish
Twitter : https://twitter.com/milkerfish

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×