1

Strangely my apache does not log errors anymore ever since I managed to enable fcgid and suexec for php processing. Even simple files with only <? dwakdnawjkdn(); ?> won't create any error, even though they do return a 500 error.

My configuration:

fastcgi.logging is set to 1.

fcgid.conf:

<IfModule mod_fcgid.c>
  DefaultMinClassProcessCount 0
  IdleTimeout 300
  IdleScanInterval 30
  MaxProcessCount 15
  MaxRequestsPerProcess 500
  PHP_Fix_Pathinfo_Enable 1
</IfModule>

VirtualHost:

<VirtualHost *:80>
        DocumentRoot "/var/www/mysite/web"
        ServerName mysite.tld
        ServerAlias mysite.tld

        SuexecUserGroup mysite mysite
        AddHandler fcgid-script .php

        <Directory "/var/www/mysite/web">
                FCGIWrapper /var/www/mysite/cgi-bin/fcgi-conf
                <FilesMatch \.php$>
                        SetHandler fcgid-script
                </FilesMatch>
                AllowOverride All
                RewriteEngine On
                Options -Indexes FollowSymLinks +ExecCGI
        </Directory>

        ErrorLog /var/www/mysite/log/error.log
        CustomLog /var/www/mysite/log/access.log combined
        LogLevel error
</VirtualHost>

cgi-bin/fcgi-conf:

#!/bin/sh
export PHPRC="/etc/php5/cgi"
exec /usr/bin/php5-cgi

What am I doing wrong?


EDIT

I switched from mod_fcgid to mod_fastcgi. This gives me "nice" errors.

I leave this question open however if someone might have an idea of fixing this, as a reference if someone runs into the same problem.

alex
  • 417
  • 1
  • 7
  • 10
  • Maybe, this question and answer can help https://serverfault.com/questions/133265/error-logging-with-php-and-mod-fcgid I'm not tested but it's about logging and I think it might help. – vee Jul 30 '21 at 16:24

0 Answers0