PDA

View Full Version : FastCGI + Apache 2.2 + PHP 5 + CentOS 5.7



hosseindp
12-31-2011, 03:28 AM
How to install FastCGI on DA 1.4 with apache 2.2 and php5 (CentOS 5.7) ?
Please explain the full Instructions step by step .

My CPU usage is very very high :(

scsi
01-02-2012, 06:51 AM
http://woshka.com/blog/apache/compile-apache-with-php-and-mod_fcgid-fastcgi-in-directadmin-installed-control-panel.html

hosseindp
01-02-2012, 09:05 AM
http://woshka.com/blog/apache/compile-apache-with-php-and-mod_fcgid-fastcgi-in-directadmin-installed-control-panel.html

Thank you for reply

I continue whit this help but when restart apache , I get yhis error :

[Mon Jan 02 16:30:14 2012] [emerg] (17)File exists: mod_fcgid: Can't create shared memory for size 1200712 bytes

Please help me again !

zEitEr
01-02-2012, 10:37 AM
It looks like it's being loaded twice. Check the modules that are listed in your apache configs. Expunge the duplicates.

hosseindp
01-04-2012, 11:16 PM
Thank you for your help

I insatalled mid_fcgid bu after it , i can not upload any files .

What is problem ? Thanks.

zEitEr
01-05-2012, 12:01 AM
Check your permissions on homedirs. If you had mod_php and PHP scripts running from apache name, with mod_fcgid you've got now all PHP scripts running from regular users name.


cd /usr/local/directadmin/scripts && ./set_permissions.sh user_homes
find /home/*/domains/*/public_html -type d -print0 | xargs -0 chmod 711
find /home/*/domains/*/public_html -type f -print0 | xargs -0 chmod 644
find /home/*/domains/*/public_html -type f -name '*.cgi*' -exec chmod 755 {} \;
find /home/*/domains/*/public_html -type f -name '*.pl*' -exec chmod 755 {} \;
find /home/*/domains/*/public_html -type f -name '*.pm*' -exec chmod 755 {} \;
cd /usr/local/directadmin/data/users && for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;

Note, though the suggested code worked for me and some other users, it might break (or might not) anything on your server (in your particular case). So I can not guarantee anything unless I do it myself.

woshka
03-21-2012, 05:07 PM
just to note a thing that you must make changes for a fcgi apache handler on directamin on a new server
meaning that you must create the user and the domain for the virtual host configuration to take effect
or simply delete that domain and recreate it for the changes to take effect on virtual host of apache configuration and all related settings