Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
How to override Apache ErrorLog for a VirtualHost

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.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!