This is an old revision of the document!


PHP SuEXEC mode

If you run shared hosting services with a control panel, it is necessary to use SuEXEC mode for security reasons. Our LSWS installation script will enable PHP SuEXEC by default for all control panels hence LSWS will run PHP SuEXEC out of the box. In SuEXEC mode, each PHP process will run as the owner of the virtual host's document root.

To manually enable SuEXEC on LSWS for cPanel, Plesk, or another control panel, Admin Console → Server → Server General → Using Apache Configuration File → PHP suEXEC should be set to Yes. However, Enabling PHP suEXEC for the control panels is default setup during the installation and you have no need to manually change it here. Once it is set, generally you should not make change anymore to avoid permission problem, since PHP SuEXEC will generally run as “user:user” while non-PHP SuEXEC will run as “nobody:nobody”.

To enable SuEXEC for LSWS native or on OpenLiteSpeed, you will need to create external apps (name should be unique and different than server level external apps and other virtual host external apps, for example, lsphp_$vhost; also set it to run as username:usergroup to implement PHP SuEXEC) and script handler pointing to the newly created external app under each virtual host.

LiteSpeed Web Server offers a number of different PHP process modes for the various needs and goals of shared hosting providers: ProcessGroup mode, Daemon mode, and Worker mode.

LiteSpeed Web Server comes with a number of PHP setups. Less experienced users may be confused as to which PHP setup they are using. Follow the steps in this wiki to determine which PHP setup you're using.

suEXEC or non-suEXEC?

  • Is the PHP suEXEC setting set to Yes or User's Home Directory Only? If so, then you are using suEXEC. If not, then you are not using suEXEC.

Which process mode am I using?

Config PHP and suEXEC in Cpanel

  • Admin
  • Last modified: 2018/09/13 21:23
  • by Michael Alegre