1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How do I run PHP over FastCGI?

Discussion in 'Plesk for Linux - 8.x and Older' started by barbutti, Mar 6, 2008.

  1. barbutti

    barbutti New Pleskian

    22
    73%
    Joined:
    Mar 6, 2008
    Messages:
    10
    Likes Received:
    0
    I have a clean install of Plesk 8.3 and I want to run PHP through FastCGI.
    How should I proceed?

    I created the domain with the "FastCGI support" checked; what exactly does that mean?

    Thanks in advance.
     
  2. WaDavid

    WaDavid Guest

    0
     
    This is fairly easy but need some extra work.

    First you need to check that you have a php binary on your system that will work for cgi. For example in my case:

    Next step, is create a php5.fcgi file in the given domain's cgi-bin folder. I am going to use the domain mydomain.com to make it easier.

    /var/www/vhosts/mydomain.com/cgi-bin/php5.fcgi
    edit: I forgot to mention, you need to change the owner of this file to that of the domain user as well as preferably chmod 755, nothing higher and at least 500 I think to have it executable by the domain user.

    Next step is configure apache but only for this specific domain.

    /var/www/vhosts/mydomain.com/conf/vhost.conf
    /var/www/vhosts/mydomain.com/conf/vhost_ssl.conf
    Now if those vhost.conf files didn't exist you need to run the following command first:
    /usr/local/psa/admin/bin/websrvmng -av

    then just double check your files that there is no problem:
    httpd -t
    Should give the output:
    Syntax OK

    Whether the vhost.conf was new or not, now reload the config files on apache (centos in my case)
    /etc/init.d/httpd reload

    Go create a info.php in /var/www/vhosts/mydomain.com/httpdocs with the following:
    Visit http://www.mydomain.com/info.php and verify your php version.
     
  3. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    From my point of view, it is much more easy to use mod_suphp.
     
  4. WaDavid

    WaDavid Guest

    0
     
    Not if you want to run multiple versions of php on 1 server.
     
  5. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    I know, but is better to have 1. People should upgrade or accept to stay on an older server with PHP4. It is a common problem, I know. :-(
     
  6. barbutti

    barbutti New Pleskian

    22
    73%
    Joined:
    Mar 6, 2008
    Messages:
    10
    Likes Received:
    0
    Thanks for the help guys, I'm making the changes now.
     
Loading...