FastCGI + Apache 2.2 + PHP 5 + CentOS 5.7

hosseindp

New member
Joined
Jun 13, 2011
Messages
3
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 :(
 
It looks like it's being loaded twice. Check the modules that are listed in your apache configs. Expunge the duplicates.
 
Thank you for your help

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

What is problem ? Thanks.
 
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.

Code:
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.
 
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
 
Sorry to bump this old thread, but I see something I encounter nowadays.

But this line:
Code:
cd /usr/local/directadmin/data/users && for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;

results on our Centos servers to:
Code:
chown: `\033[00m\033[01;31madmin\033[00m:\033[00m\033[01;31madmin\033[00m': invalid user
chown: `\033[01;31muser2\033[00m:\033[01;31muser2\033[00m': invalid user
chown: `\033[01;31muser3\033[00m:\033[01;31muser3\033[00m': invalid user
chown: `\033[01;31muser4\033[00m:\033[01;31muser4\033[00m': invalid user
chown: `\033[01;31muser5\033[00m:\033[01;31muser5\033[00m': invalid user
chown: `\033[01;31muser6\033[00m:\033[01;31muser6\033[00m': invalid user
chown: `\033[m:\033[m': invalid user
Is there an easy fix for this so it will work again?
I changed the usernames to user1, user2, etc. for security reasons.
 
What if you do a simple ls -l in that dir, are all usernames displayed correctly?

If i try

cd /usr/local/directadmin/data/users && for i in `ls`; do { echo $i; }; done;

It just echo's all usernames correctly. I'm not familiar with SecureCRT so I have no clue if that has got something to do with anything.
 
When I try:
cd /usr/local/directadmin/data/users && for i in `ls`; do { echo $i; }; done;

as you said, then the usernames are displayed nicely below each other. By the way... I don't think using SecureCRT has something to do with it.

I think I found what might cause the problem, I first thought maybe some color changes I made in DIR_COLORS, but now I think problem is caused because I made a nicer prompt in .bashrc:
Code:
export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
export LS_OPTIONS="--human --color=always"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -Al

I copied that from somewhere. But if there is a way to keep that nice prompt, but not have it interfere with those kinds of commands, that would be very nice.
 
Yep, I just tried, it is this line what is causing the problem, without this line, all works fine:
Code:
export LS_OPTIONS="--human --color=always"

Maybe I need to set the --color=always to something else?
 
Try:
Code:
export LS_OPTIONS="--human --color=auto"
and let us know if it works properly.

Jeff
 
Glad to hear it. I don't know what auto specifically does (it may be documented somewhere besides in the source) but the concept is that it applies color where it makes sense to do so, and doesn't where it doesn't make sense.

In your context, color didn't make sense, but always, of course, means always :).

Jeff
 
Yep, that's why I tested the lines, because I also did not trust that "always".:D
Thank you for fixing it for me!
 
Back
Top