Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Unable to change document root for php-fpm domain

Discussion in 'EasyApache' started by rappie, Nov 19, 2018.

Tags:
  1. rappie

    rappie Active Member

    Joined:
    Oct 4, 2008
    Messages:
    27
    Likes Received:
    4
    Trophy Points:
    53
    Location:
    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?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,590
    Likes Received:
    2,186
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice