Change Mod-PHP to Fast-CGI

Discussion in 'General' started by JuSt, Feb 16, 2017.

  1. JuSt

    JuSt New Member

    Hello to everyone,

    I'm using PHP with mode "Mod PHP", and i'm experimenting some troubles with folders permissions (CLI mode), i need to change permissions from 755 to 777, so www-data can write into the folder.

    My question is...how do i change the mode from CLI to Fast-CGI? i dont wanna have 2 versions, only fcgi mode...

    Kind regards.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The mod_php mode should not be used for any scripts that need to write data, and it is insecure anyway, so don't use that.

    Change the php mode to php-fpm or php-fcgi in the website and ensure that the suexec checkbox is on. This ensures that php scripts get executedas the web user and not the wrong www-data user and group. and undo the manual changes of the user and chmod that you made.
     
  3. JuSt

    JuSt New Member

    Hello Till,

    Than you for be so quick, do i have to install some packages before using Fast-CGI? i only have installed in my server this package...

    ii libapache2-mod-php5.6 5.6.26-1+deb.sury.org~trusty+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
    rc libapache2-mod-suphp 0.7.2-0ubuntu1 amd64 Apache2 module to run PHP scripts with the owner permissions
    c suphp-common 0.7.2-0ubuntu1 amd64 Common files for mod suphp

    Kind regards!!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you followed one of the perfect server guides, then everything is installed. If you did not follow the guides, then you should go trough the perfect server guide for your os and install the missing packages, then run an ispconfig update and choose to reconfigure services.
     
  5. JuSt

    JuSt New Member

    Hello Till,
    Perfect, i've checked again the packages and they're already installed:

    ii libapache2-mod-fastcgi 2.4.7~0910052141-1.1 amd64 Apache 2 FastCGI module for long-running CGI scripts
    ii libapache2-mod-fcgid 1:2.3.9-1 amd64 FastCGI interface module for Apache 2
    ii php5.6-cgi 5.6.26-1+deb.sury.org~trusty+1 amd64 server-side, HTML-embedded scripting language (CGI binary)

    Thanks for all as always!!!

    Kind regards!
     

Share This Page