How to configure FastCGI with HC or HCnix panel?


Question: How to configure FastCGI with HC/HCnix panel ?

Answer:
  1. Eanble "FastCGI" as PHP Handler in the HC/HCnix panel at Host Level path Manage Servers :: My Servers :: Edit Server , its setting will be automatically populated in panel.

  2. SuExec mechanism should be  enabled on the server, follow these steps to confirm:
         
    Restart the Apache server by giving this command: /etc/init.d/httpd restart OR /etc/init.d/apache2 restart

    Then check the Apache logs at this path  /var/log/httpd/error_log  OR /var/log/apache2/error_log

    Following line should be displayed in the log file “suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)” Which will confirm that SuExec is enabled on your server
    .

  3. In FastCGI case, your webspace path should be located under the same path which is set for SuExec document root directory. 

    You can confirm the SuExec document root path by giving this command on your server: 
     #suexec –V
         
    Following output will come: “ -D AP_DOC_ROOT="/var/www"”

For the installation of PHP FastCGI, run this command on your server:  yum install mod_fcgid php-cli

And then Restart Apache.

 

Note: The FastCGI settings in HC/HCnix panel are recommended for those customers who can easily change the web root path. If you do not want to change the web root path then it is better to use DSO (Openbase_dir) which is very easy to secure and manage in the HC/HCnix panel.