Tracker-proxy fails to track visitors

I was trying to set up the tracker proxy after javascript tracking was running successfully.
I cloned the repository into my root folder of the website. Both my Matomo server and the proxy are up and running. My server runs on PHP 5.5.38 and when I request the piwik.php, I receive an error status:

/* there was an error loading piwik.js */

I dug into the code of the proxy.php file and cannot comprehend why it would not serve the browser the piwik.js file which is accessible when I open

Is it a bug in combination with my PHP version? Am I doing something wrong?

Can anybody help me getting this up and running as I would really love to be able to track again?

Here are some of my configuration details:

<!-- Matomo code in HTML -->
<script type="text/javascript">
  var _paq = window._paq || [];
  _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
  _paq.push(["setCookieDomain", "*"]);
  _paq.push(["setDomains", ["*","*"]]);
  _paq.push(['addDownloadExtensions', "vcf"]);
  _paq.push(['enableHeartBeatTimer', 5]);
  (function() {
    var u="//";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '2']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.php'; s.parentNode.insertBefore(g,s);
<!-- End Matomo Code -->
// config file
$PIWIK_URL = '';
$PROXY_URL = '';
$TOKEN_AUTH = 'xyz32_chars/digits_hex_token';

I have working SSL certificates. I also tried setting the DEBUG_PROXY flag to true but I do not get any output even with an ini_set call before that should display the errors.

Thanks in advance for your help!

That is strange, code looks right