fbpx

How to Switch your Dedicated Server from suPHP to FastCGI

This instruction is for switching your server from suPHP to CGI, FASTCGI, etc. root access is needed for this tutorial.

Note: webnexs grants root access to all VPS Hosting and Dedicated hosting plans.

Check current available configurations

  1. Sign in as the root user into your servers command line.
  2. Use the below red command to find out the options available on your server.

/usr/local/cpanel/bin/rebuild_phpconf –current
Available handlers: suphpfcgicgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: suphp
SUEXEC: enabled
RUID2: not installed

Switch your server to FastCGI

  1. Sign in as the root user into your servers command line.
  2. Use the below red command to change your system to FastCGI from SuPHP.

/usr/local/cpanel/bin/rebuild_phpconf 5 none fcgienabled
[/usr/local/cpanel/scripts/set_mailman_archive_perms] Setting I/O priority to reduce system load: best-effort: prio 6
[/usr/local/cpanel/scripts/set_mailman_archive_perms] Setting mailman archive permissions
[/usr/local/cpanel/scripts/set_mailman_archive_perms] Continuing in the background
php.conf updated to:

# This file was automatically generated by the Cpanel PHP Configuration system
# If you wish to change the way PHP is being handled by Apache on your system,
# use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface.
# Manual edits of this file will be lost when Apache is updated.

# Fastcgi configuration for PHP5
LoadModulefcgid_module modules/mod_fcgid.so
MaxRequestsPerProcess 500
AddHandlerfcgid-script .php5 .php4 .php .php3 .php2 .phtml
FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php5
FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php4
FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php
FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php3
FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php2
FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .phtml

# End of autogenerated PHP configuration.

Updating user configurable PHP settings.
[info]recursion depth is set to: 2
Restarting Apache

3. Use the below red command to confirm the changes.

/usr/local/cpanel/bin/rebuild_phpconf –current
Available handlers: suphpfcgicgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: fcgi
SUEXEC: enabled
RUID2: not installed

Leave A Comment