Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

135
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda