How can I make nginx set the HTTPS header in a single http/https server? piwik with force_ssl=1 on apache goes into a redirect loop because it doesn't know SSL is on due to the nginx reverse proxy. There is a piwik bug which references a similar problem and blames the HTTPS header: http://dev.piwik.org/trac/ticket/2073 - Grant