Piwik behind proxy which returns always 404


I have a Piwik Installation in a business intranet which tracks visits and popularity of intranet websites.
The server is behind a proxy, which has to be configured to connect the internet.
It is a IIS 8.5 with PHP.

The problem is, that piwik cannot connect to the internet, so I have to update manually.
I configured piwik to use the proxy, the web application process is mapped temporary to my user, so internet connection should be working.

I debugged a lot in core/Http.php:
With fopen, I get simply nothing as a result.
The result of socket and curl (the default method) seems to be the same.

I receive always following response with the curl method:

HTTP/1.1 404 Not Found
Date: Thu, 26 Feb 2015 09:05:16 GMT
Server: Apache/2.2.22 (Linux/SUSE)
Vary: accept-language,accept-charset
Accept-Ranges: bytes
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Content-Language: en

I testet different urls, internal and external.
On HTTPS, I always get an Error: Received HTTP code 405 from proxy after CONNECT.
On HTTP, I always get the 404 result.

I’m pretty sure the 404 results is coming from the proxy, but why?
Did I miss something or is this a general problem with IIS/PHP and Proxy?

Thanks for help!

You can configure your company’s proxy settings inside [Proxy] part of your config/config.ini.php
Just read config/global.ini.php for references


yes, I read the FAQ and help files.
I configured Piwik to use the proxy. Without the proxy settings, I would not get a 404 from the proxy.

I think there are problems with the user account under which piwik is running.

Consider also you need to configure the X-Forwarded-For header.

Then another consideration is you need a basic-auth standard kind of authentication, I think stuff like NTLM or certificates authentication wouldn’t work.