Frage

I configured nginx as a reverse proxy with this configuration:

www.mydomain.com --> drupal.mydomain.com

www.mydomain.com/store --> magento.navionics.com

Drupal (website)

location / {
            proxy_pass         http://10.21.120.12/;
            proxy_redirect     http://10.21.120.12/ http://$server_name/;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            client_max_body_size       50m;
            client_body_buffer_size    128k;
            proxy_connect_timeout      90;
            proxy_send_timeout         90;
            proxy_read_timeout         90;
            proxy_buffer_size          4k;
            proxy_buffers               4 32k;
            proxy_busy_buffers_size     64k;
            proxy_temp_file_write_size 64k;
    }

Magento

    location /store {
            proxy_pass         http://10.192.134.10/;
            proxy_redirect     http://10.192.134.10/ http://$server_name/store/;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            client_max_body_size       50m;
            client_body_buffer_size    128k;
            proxy_connect_timeout      90;
            proxy_send_timeout         90;
            proxy_read_timeout         90;
            proxy_buffer_size          4k;
            proxy_buffers               4 32k;
            proxy_busy_buffers_size     64k;
            proxy_temp_file_write_size 64k;

When i tried www.mydomain.com i can see the drupal website.

When i tried www.mydomain.com/store or www.mydomain.com/store/ i received the error

"Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects."  
War es hilfreich?

Lösung

Magento always redirect to the path, entered in config/web for each store.

If u try to rewrite my any nginx/apache/xyz rule, magento will re-rewrite it again... so the inifnite loop is being created.

Set the correct path for your magento store in its config/web setting, and it will be working.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top