FastCGI on RHEL4

I spent the better part of the morning trying to figure out how to get FastCGI running on one of our corporate servers. For reference, here are the steps I took for RHEL4 with Apache2.Problem:

FastCGI permission denied. Unable to create server in directory

Definitely a permissions problem. Rather than try to muck with the Apache2 setup (okay, I admit I did that first) I decided to just use the FastCgiIpc directive and set it to /tmp/fastcgi_ipc.

Then, chown apache:apache fastcgi_ipc Then, chmod 755 fastcgi_ipc

Ok, that works. But now I’m getting the following error:

.fcgi” has failed to remain running for 30 seconds given 3 attempts…

This really stumped me until I found a small reference in the fastcgi developer’s list mentioning problems with SELinux on Red Hat Enterprise Linux. It seems that SELinux is somehow preventing the fastcgi process to continue. The solution was to change the “targeted” policy in SELinux.

From the GUI: Applications->SystemSettings->Security Level.

Then, go to the SELinux tab and make sure “Disable SELinux for httpd deamon” is checked. I”m going to look into the security implications of this as well.

From the CLI: Go to /etc/selinux/targeted. Open up the booleans file and change httpd_disable_trans=0 to httpd_disable_trans=1.

Restart the Apache2 server.

WordPress database error: [Table './austintech_wp/wp_comments' is marked as crashed and last (automatic?) repair failed]
SELECT * FROM wp_comments WHERE comment_post_ID = '6' AND comment_approved = '1' ORDER BY comment_date

Leave a Comment