Unable to change document root for php-fpm domain

rappie

Active Member
Oct 4, 2008
29
4
53
Amsterdam
I am trying to change the default document root for a domain running php-fpm. To do so i've add to code below to /var/cpanel/userdata/user/domain.php_fpm.yaml file.

Code:
php_admin_value_doc_root: { name: 'php_admin_value[doc_root]', value: "/home/username/public_html/test" }
* i've tried both with and without the double quotes for the value.

After adding the code I run
Code:
/scripts/php_fpm_config --rebuild
/scripts/restartsrv_apache_php_fpm
/scripts/restartsrv_httpd
But no luck.

What else can I do to troubleshot?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello @rappie,

The contents of the /var/cpanel/userdata/username/domain.com.php-fpm.yaml file should look like this:

Code:
---
_is_present: 1
php_admin_value_doc_root: { name: 'php_admin_value[doc_root]', value: /home/username123/test/public_html }
Can you verify the YAML file you modified matches this syntax? In particular, I don't see the first two lines in the output you provided, and quotes are not required around the value.

Thank you.