Migración de DSO a suPHP Imprimir

  • 0

Configure WHM for suPHP

In the PHP 5 Handler menu, select suPHP and click Save Configuration. 

Update permissions and ownership

To update file permissions and ownership, perform the following changes inside each user's public_html directory:

  • Change the permissions of files to 644 and directories to 755.
  • Change the ownership of the files and directories within the public_html directory to user:user.

    Warnings:

    • Do  not  change the  public_html  directory owner. The public_html  directory defaults to the   user:nobody owner .
    • Do not make any changes to the directory itself.
    • If you change ownership or permissions of files outside of the public_html directory, you may cause problems with other aspects of the account, such as mail.

Edit the .htaccess files

If you previously allowed PHP customizations through .htaccess files, you must remove or comment out all php_value or php_flag settings in the user .htaccess files.

Warning:

We strongly recommend that you perform a backup before you make changes to your .htaccess files.

Run the following commands to remove the php_value and php_flag settings from the .htaccess files:

1
2
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_value' '{}' \;
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_flag' '{}' \; 

PHP customizations

To allow PHP customization, create a custom php.ini file in the user's directory.

To create a custom php.ini file, perform the following steps:

  1. Copy the server's /usr/local/lib/php.ini to the user's home directory.
  2. Add the new values to the user's php.ini file.

    Warning:

    If an invalid php.ini file resides in the user's directory, suPHP defaults to the php.ini file in the /usr/local/lib/ directory.

  3. For each directory that contains  PHP  scripts that require the custom settings, add  suPHP_ConfigPath /home/username/  to the  .htaccess  file in the folder that contains the  PHP  script.
Fuente: https://documentation.cpanel.net/display/ALD/Configure+PHP+and+suEXEC#ConfigurePHPandsuEXEC-MigratefromDSOtosuPHP

¿Fue útil la respuesta?

« Atrás