Preconditions
Steps to reproduce
Expected result
Actual result
Get the error redirect loop in admin. Front-end work well
@tanvandinh I had the same problem but i can fix modifying the nginx file configuration.
I use the nginx configuration included with the magento installation. And I change the PHP entry point to add the next params:
fastcgi_param HTTPS "on";
fastcgi_param HTTP_X_FORWARDED_PROTO "https";
So, the section of the php entry point must be:
# PHP entry point for main application
location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404;
fastcgi_pass fastcgi_backend;
fastcgi_buffers 1024 4k;
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS "on";
fastcgi_param HTTP_X_FORWARDED_PROTO "https";
include fastcgi_params;
}
Hi @sergi-omit,
Thank you for your information.
Did you use admin custom URL(domain point by local DNS) that URL use http (not https). I get the error when try to custom admin URL. I use Nginx configuration included with the Magento and add
fastcgi_param HTTPS "on";
fastcgi_param HTTP_X_FORWARDED_PROTO "https";
As you are mentions also but the errors does not fix. Currently we use default admin URL (the same with fron-end [base-url]/admin_**)
Would love any of comment or sugesstion on this ticket.
Thank you so much
This seems also to affect the normal URL in 2.1.x
Too many redirect when the proxy forces ssl for the admin url but the databse is still set to http.
so HTTPS "on" seems to be ignored from the admin panel and it still tries to redirect back to http, hence the loop with the transparent https proxy in front of it redirecting everything to https....
In my opinion it should not force http through db settings since http is default but only force https if required.
@tanvandinh close this issue as duplicate ->https://github.com/magento/magento2/issues/17556
please set: web/secure/use_in_frontend and web/secure/use_in_adminhtml to 0
Please read here for more detail:
https://mrvts.wordpress.com/2018/12/17/magento-2-nginx-varnish-full-page-cache-backend-admin-redirect-loop-why-and-how-to-fix/
Most helpful comment
@tanvandinh I had the same problem but i can fix modifying the nginx file configuration.
I use the nginx configuration included with the magento installation. And I change the PHP entry point to add the next params:
So, the section of the php entry point must be: