Opened 3 years ago

Closed 3 years ago

Last modified 2 months ago

#2073 closed Bug (answered)

force_ssl_login produces redirect chain

Reported by: hukl Owned by:
Priority: normal Milestone: Piwik 1.2
Component: Core Keywords: ssl
Cc: Sensitive: no

Description

I am running piwik on nginx with php-fpm and I have configured a vhost for port 80 and one for 443. Both work just fine and I am able to login and use piwik via https.

However if I enable "force_ssl_login" Safari throws a "Too many redirects" error.

When using curl -k -v https://my-host.com/ I'm getting another
HTTP/1.1 302 Moved Temporarily
Location: https://my-host.com/

Is there maybe a header that is missing like X-FORWARDED-PROTO?

Change History (4)

comment:1 Changed 3 years ago by hukl

Hmm, forget the last line - that header should only be relevant in proxy setups

comment:2 Changed 3 years ago by vipsoft (robocoder)

  • Milestone set to 1.2 Piwik 1.2
  • Resolution set to answered
  • Status changed from new to closed

Your nginx configuration doesn't appear to set the HTTPS environment variable (which PHP looks for in $_SERVER['HTTPS']). Add this to your nginx config:

fastcgi_param HTTPS on;

comment:3 Changed 3 years ago by hukl

Thank you! That helped!

Note: See TracTickets for help on using tickets.