New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support https reverse proxying #466
Comments
This actually sounds like a bug in the reverse proxy. |
Actually it is more of a feature request than a bug. The reverse proxy can not tell the web server behind if it use http or https. so, with a url https://piwik.domain.com, the form created by piwik point to http://piwik.domain.com So i’m requesting a feature that allow to disable the complete url for form, or to tell piwik that it should use https instead of http. At the end, it the web application responsability to offer such a feature. For example, phpmyadmin allow it. |
Have you configured your reverse proxy to use ``` ? |
Hi, I’ve just tried it, without anything else, in my Apache 2 config. It has no visible effect. After digging a little, it seems that it is needed to do reverse proxy with a https site in backend: https → proxy → https My configuration use piwik in HTTP: https → proxy → http This morning, while playing with Piwik, i’ve found out that Piwik worked well either in HTTP or in HTTPS. The only problem i have with HTTPS is with the login form. The action of the login form is http://piwik.domain.fr/index.php?module=CoreHome&action= even when i’m accessing piwik in HTTPS. Would it be a security issue to use relative URL for the login form ? Something like : /index.php?module=CoreHome&action= This would bypass the problem. This could be an Piwik option that enable people using https to http reverse proxy to use Piwik without problems. |
Attachment: Thanks for clarifying your set-up. I’ve attached a sample reverse proxy configuration using mod_proxy_html to rewrite the login form’s action URL. Other than masking some information about my set-up, this is the configuration I tested. It might still need a little “magic” (e.g., ProxyHTMLLinks for some legacy html elements). |
See patch |
Attachment: |
have committed patch from vipsoft, please close ticket if that actually fixes the bug. thanks! |
I close it because of missing feedback; when next release is published, if you still experience the issue, please reopen the ticket. |
without using the provided virtualhost (that use mod_proxy_html), the patch fixe half of the problem: when accessing to login form in https, the form is submitted over https, so the password is not sent over the network in plain text. but once logged in, the user is redirected to the http connection (probably due to the fact that form_url hidden input is something like “http://…”.) as said before, my setup is “HTTPS so i leave this bug as closed… but without using mod_proxy_html, or https on the server behind the reverse proxy.. it just allow to have password protected by https |
landure of others, if you can think of any way to fix something in Piwik to make it work with your setup let us know by commenting here. how other php projects handle this problem for example? |
I’m using Piwik behind a Apache 2 reverse proxy.
Here is my configuration:
Internet → Apache 2 (http, OR https) -(reverse proxying)→ lighttpd (http) hosting piwik.
Since the Piwik login page use a absolute URL for the login form, even if i access the Apache 2 reverse proxy using:
https://piwik.domain.com/
the login form action use the protocol value detected from lighttpd:
http://piwik.domain.com/
This is an issue. The solution is to add an option to disable complete URL for forms. (so that the action is just / in stead of http://piwik.domain.com.
This would allow to use different protocols between reverse proxy and actual piwik http server.
Keywords: reverse proxy login https
The text was updated successfully, but these errors were encountered: