Page 1 of 1

Redirect http to https (phpmyadmin)

Posted: Mon Mar 28, 2016 7:53 pm
by ivobyte
I'd like to redirect all requests from http://mydomain.com/phpmyadmin to https://mydomain.com/phpmyadmin. I know that before phpmyadmin 4.6 there's an option to force ssl via phpma config files. At the moment I have older version than 4.6 but for the future I need some other solution instead of the force ssl via config files.

When I tried to set "rewrite ^ https://mydomain.com$request_uri? permanent;" under /phpmyadmin location line I got "too many redirects" in Chrome.

I use nginx + php-fpm.

EDIT: I solved my problem by adding "return 301 https://$server_name$request_uri;" to my nginx config.

Re: Redirect http to https (phpmyadmin)

Posted: Tue Mar 29, 2016 7:16 am
by skurudo
solved by adding "return 301 https://$server_name$request_uri;" to my nginx config
ok, closed.