Prestashop: PS 1.7.6.9 New install multistore ERR_TOO_MANY_REDIRECTS (nginx + apache)

Created on 18 Nov 2020  路  4Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

Too many redirect when using multistore

Expected behavior

Be able to see frontedn of every multistore

Steps to Reproduce

Steps to reproduce the behavior:

1) install ps 1.7.6.9 on store.mystore.com url
2) enable multistore
3) create a test group and a test store
4) go on category and create a new root category "store1" (need to create before a second store to see the button, this is a second and separate bug)
5) go on multistore and add a second website to default group, assign "store1" category
6) assing the url store1.mystore.com for url
7) try to open both frontend store.mystore.com or store1.mystore.com result in 301 ERR_TOO_MANY_REDIRECTS

.htaccess is generated
nginx act like a reverse proxy and redirect all request to apache

`server {

include /etc/nginx/deny-ip.conf;

    listen 80;
    listen [::]:80;

    # -- REDIRECT HTTP TO HTTPS PER STORE.SIXRACE.IT
    server_name store.mystore.com;
    return 301 https//store.mystore.com$request_uri;

}

server {

include /etc/nginx/deny-ip.conf;

    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Scheme https;
    proxy_set_header X-Forwarded-Proto https;
    proxy_headers_hash_max_size 512;
    proxy_headers_hash_bucket_size 128;
    proxy_set_header Host $host;
    proxy_redirect off;
    proxy_connect_timeout       6000;
    proxy_send_timeout          6000;
    proxy_read_timeout          6000;
    send_timeout                6000;

    expires $expires;

    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    root /var/www/htdocs/ps_multistore;

    index index.html index.htm index.php;

    server_name store.mystore.com;

    add_header X-NG-Cache-Status $upstream_cache_status;
    add_header X-NG-Cache-Date $upstream_http_date;


    location / {
            http2_push_preload on;
            proxy_pass http://127.0.0.1:8080;
            proxy_buffer_size          128k;
            proxy_buffers              4 256k;
            proxy_busy_buffers_size    256k;
    }

ssl_certificate /etc/letsencrypt/live/store.mystore.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/store.mystore.com/privkey.pem; # managed by Certbot

}`

apache

`
ServerAdmin [email protected]
DocumentRoot /var/www/htdocs/ps_multistore/
ServerName store.mystore.com


Options FollowSymLinks
AllowOverride All
Require all granted
SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"

`

If applicable, add screenshots or screen recordings to help explain your problem.

Additional information

ps 1.7.6.9
php 7.2

1.7.6.9 BO Bug Multistore No change required

Most helpful comment

Have you try to set SSL on all page in the shop configuration, before go to front office. -> thanks need to do that for every store!

All 4 comments

Hello @matteolavaggi

I didn't manage to reproduce your issue with PS1.7.6.9.
I believe you may have a problem with your shop URL, so please follow our documentation to solve your problem (Setting a shop's URL)
Please check and feedback.

Thanks!

Have you try to set SSL on all page in the shop configuration, before go to front office.

nginx want https prestashop redirect to http

Have you try to set SSL on all page in the shop configuration, before go to front office. -> thanks need to do that for every store!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fabuloops picture Fabuloops  路  3Comments

vincent-dp picture vincent-dp  路  3Comments

Van-peterson picture Van-peterson  路  3Comments

centoasa picture centoasa  路  3Comments

sandra2n picture sandra2n  路  3Comments