Virtualmin Nginx Prestashop ERR_TOO_MANY_REDIRECTS

4 posts / 0 new
Last post
#1 Thu, 08/29/2019 - 09:01
chakiboss

Virtualmin Nginx Prestashop ERR_TOO_MANY_REDIRECTS

Hello All i have ERR_TOO_MANY_REDIRECTS in my prestashop virtual server after adding SSL letsencrypt and i can't correct this for days!!!!!!!! i need help this is my nginx website.conf

server {
server_name website.com www.website.com;
listen 51.44.44.87:443 default_server ssl;

root /home/website/public_html;
index index.php;
access_log /var/log/virtualmin/website.com_access_log;
error_log /var/log/virtualmin/website.com_error_log;

rewrite ^/[a-zA-Z][a-zA-Z]/index.php(.*)$ /index.php$1 last;
rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg last;
rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;
rewrite ^/c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2$3.jpg last;
rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last;
rewrite ^/images_ie/?([^/]+)\.(jpe?g|png|gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last;
if (!-d $request_filename) {
            rewrite     ^/(.+)/$ /$1 permanent;
    }
    if ($scheme != "https") {
        rewrite ^ https://$host$uri permanent;
        }
location = /favicon.ico {
                log_not_found off;
                access_log off;
    }

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

    error_page 404 /index.php?controller=404;
    location ~* \.(gif)$ {
          expires 2592000s;
       }
       location ~* \.(jpeg|jpg)$ {
          expires 2592000s;
       }
       location ~* \.(png)$ {
          expires 2592000s;
       }
       location ~* \.(css)$ {
          expires 604800s;
       }
       location ~* \.(js|jsonp)$ {
          expires 604800s;
       }
       location ~* \.(js)$ {
          expires 604800s;
       }
       location ~* \.(ico)$ {
          expires 31536000s;
       }
location / {
     
         try_files $uri $uri/ /index.php?q=$uri&$args /admin/$is_args$args;
         #return 301 https://$host$request_uri;  # enforce https
    }
   
   
location ~ \.php$ {

fastcgi_pass unix:/var/php-nginx/156640746611458.sock/socket;
        fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
#fastcgi_pass unix:/var/run/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
   

ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_certificate /home/website/ssl.combined;
ssl_certificate_key /home/website/ssl.key;
ssl on;
fastcgi_read_timeout 300;
gzip off;

rewrite ^/[a-zA-Z][a-zA-Z]/mix/index.php(.*)$ /admin/index.php$1 last;
rewrite_log off;

}
Thu, 08/29/2019 - 12:28
Jfro

WOW:

ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2;

Thu, 08/29/2019 - 12:36 (Reply to #2)
chakiboss

is that a problem ? lol

Thu, 08/29/2019 - 13:14
Topic locked