I would like to direct Apache error output to /proc/self/fd/1 in a VirtualHost block, but it continues to output to the file configured in apache2.conf (error.log).
/etc/apache2/apache2.conf:
ErrorLog ${APACHE_LOG_DIR}/error.log
/etc/apache2/sites-enabled/vhost.conf:
<VirtualHost _default_:80>
DocumentRoot /data/frontend/web/
RewriteEngine On
DirectoryIndex index.php
<Directory /data/frontend/web/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
LogLevel info
ErrorLog /proc/self/fd/1
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
I tried using a file to troubleshoot (ErrorLog /var/log/apache2/verrors.log) and I see that Apache creates the file verrors.log but it remains empty and the error.log file gets the log messages.
Other configuration in vhost.conf works as expected, even the CustomLog directive.