Step 1
Update variable documentroot
in following two file:
sudo nano /var/cpanel/userdata/<cpanel-username>/<example.com>
sudo nano /var/cpanel/userdata/<cpanel-username>/<example.com>_SSL
Replace <example.com>
to your actual domain.
You need update following line in both files:
documentroot: /home/<cpanel-username>/public_html
to your target folder.
Eg:
documentroot: /home/<cpanel-username>/public_html/public
Step 2
Then edit:
sudo nano /var/cpanel/userdata/<cpanel-username>/<example.com>.php-fpm.yaml
and add following line
php_admin_value_doc_root: { name: 'php_admin_value[doc_root]', value: /home/<cpanel-username>/public_html/public }
Final file will look like:
---
_is_present: 1
php_admin_value_doc_root: { name: 'php_admin_value[doc_root]', value: /home/<cpanel-username>/public_html/public }
Step 3
Then to rebuild the Apache conf and restart Apache:
/scripts/php_fpm_config --rebuild
/scripts/rebuildhttpdconf
/scripts/restartsrv_apache_php_fpm
/scripts/restartsrv_httpd
service httpd restart
When you visit your url and getting following message:
No input file specified
Simply restart the server, it should be fixed.
Top comments (0)