1 post tagged “apache 2”
Just ran into another potential useful tip for you. If you find that your FastCGI configuration settings are being ignored when running mod_fcgid 2.2 and Apache 2.x and you're using VirtualHosts try calling the configuration directives from within the VirtualHost block.
Apparently mod_fcgid settings (like IPCCommTimeout and the like) which are set in the global config file or anywhere outside of the vhost block are wiped out within the VirtualHost block, replaced by the default settings.
So in you httpd.conf, do:
# Load FastCGI module
LoadModule fcgid_module modules/mod_fcgid.so# Include global FastCGI settings module
Include conf/extra/mod_fcgid.conf
Then within each VirtualHost you can include your Apache defaults and then override them:
# Include global FastCGI settings module
Include conf/extra/mod_fcgid.conf<IfModule mod_fcgid.c>
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>ProcessLifeTime 7200
</IfModule>
...or just specify them all in place. Just for reference here are the settings I like particularly for running Movable Type under FastCGI. YMMV.
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule><IfModule mod_fcgid.c>
# Sane place to put sockets
SocketPath /tmp/fcgid_sock/
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 1000
DefaultMinClassProcessCount 3
DefaultMaxClassProcessCount 100
IPCConnectTimeout 8
IPCCommTimeout 360
BusyTimeout 300
</IfModule>