title: Apache / PHP error_log location in Docker
body: <p>My PHP script has an error. For example, this shows this on the screen:</p>
  <blockquote>
  <p>Warning: require(/var/www/foo.php): failed to open stream:</p>
  </blockquote>
  <p>Where can I find this in the logs?</p>
  <p>I tried <code>docker logs containerName</code>, but it only shows access logs. E.g.,</p>
  <p><code>192.168.2.1 - - [17/Mar/2019:10:00:00 +0000] &quot;GET / HTTP/1.1&quot; 200 505 &quot;-&quot; &quot;Mozilla/5.0 (Windows NT 6.1; Win64; x64)...</code></p>
  <p>It doesn't show the PHP error above.</p>
  <p>Going in the Apache logs folder inside the container via <code>docker exec</code> shows the following:</p>
  <pre class="lang-none prettyprint-override"><code>ls -hltra /var/log/apache2
  
  total 0
  lrwxrwxrwx. 1 www-data www-data 11 Feb  6 04:42 other_vhosts_access.log -&gt; /dev/stdout
  lrwxrwxrwx. 1 www-data www-data 11 Feb  6 04:42 error.log -&gt; /dev/stderr
  lrwxrwxrwx. 1 www-data www-data 11 Feb  6 04:42 access.log -&gt; /dev/stdout
  </code></pre>
  <p>I'm not even sure if this is where the PHP logs are at, but I can't view them.</p>
  <p>Where can I find the Apache/PHP error logs in Docker?</p>