Introduction
Following a change to the document root for the primary domain on a cPanel account, the website is now showing the error "No input file specified."
The domain is configured to use PHP-FPM.
Procedure
After changing the document root for a domain that is using PHP-FPM, you must also update the PHP-FPM configuration to use the updated document root.
Find the PHP-FPM configuration for the domain at the following location for the domain in question:
/var/cpanel/userdata/USER/DOMAIN.php-fpm.yaml
Replace USER with the cPanel username, and DOMAIN with the domain name.
Modify this file using your text editor of choice (vi, nano, etc) and add the following line:
php_admin_value_doc_root: { name: 'php_admin_value[doc_root]', value: /home/USER/NEW/DOCUMENT/ROOT }
Once completed, the PHP-FPM configuration will need to be rebuilt and PHP-FPM restarted.
/scripts/php_fpm_config --rebuild
/scripts/restartsrv_apache_php_fpm
Comments
0 comments
Article is closed for comments.