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 https://my_matomo.com/piwik.js.

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", "*.my.domain.com"]);
  _paq.push(["setDomains", ["*.my.domain.com","*.my.domain.com"]]);
  _paq.push(['addDownloadExtensions', "vcf"]);
  _paq.push(['trackPageView']);
  _paq.push(['enableHeartBeatTimer', 5]);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//my.domain.com/";
    _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);
  })();
</script>
<!-- End Matomo Code -->
// config file
$PIWIK_URL = 'https://private.matomoURL.com:8444/';
$PROXY_URL = 'https://my.domain.com/';
$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!