Changing Primary Domain Document Root in Cpanel

  1. Login to ssh.
  2. sudo and edit this file:

    If you have SSL:


    user is your cpanel username and domain is your domain, _SSL capital leter.

  3. Change these 2 line to your new document root:
    documentroot: /home/USER/public_html


    path: /home/USER/public_html/cgi-bin
  4. Run sudo:
    sudo /scripts/rebuildhttpdconf
    sudo service httpd restart
  5. Done.

[Solved] Composer SSL Certificate Failed


got this error when running composer on Windows with PHP 5.6

 The "" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
 error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
 Failed to enable crypto
 failed to open stream: operation failed

Run this in console:

php -r "print_r(openssl_get_cert_locations());"

Mine got something like this:

    [default_cert_file] => f:\repo\winlibs_openssl_vc11_x86/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => f:\repo\winlibs_openssl_vc11_x86/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => f:\repo\winlibs_openssl_vc11_x86/private
    [default_default_cert_area] => f:\repo\winlibs_openssl_vc11_x86
    [ini_cafile] =>
    [ini_capath] =>

but I have no “f:\repo” directory so it was pointing to wrong location.

To fix this, add this line to PHP.ini


Or download cacert.pem from
and add this line to PHP.ini