Β
Β
Β
In this article, we will understand how to set document root in centos.
Β
Β
This is also the solution of the error:
Β
-
- No input file specified in Magento2
- How to solve proxy_fcgi:error AH01071: Got error ‘Unable to open primary script
Let’s start now …
Β
1. First go to userdata directoryΒ /var/cpanel/userdata/<USERNAME>
Β
Here you will find file –Β yourdomain.com.php-fpm.yaml
Β
Open this file with nano or vim editor and add following line at the end of it.
Β
php_admin_value_doc_root: { name: ‘php_admin_value[doc_root]’, value: /home/<USERNAME>/public_html/<DOCUMENT_ROOT> }
Β
Save the file.
Β
2. Execute following commands one by one.
Β
/scripts/php_fpm_config –rebuildΒ
Β
/scripts/restartsrv_apache_php_fpmΒ
Β
/scripts/restartsrv_httpd
Β
This will rebuild php fpm config and restart php fpm service for apache. Now in the same folder open
Β
YOURDOMAIN.com
YOURDOMAIN.com_SSL
Β
Change document root here as well.
Β
3. Run following commands.
Β
/scripts/rebuildhttpdconfΒ
Β
/scripts/restartsrv_httpd
Β
This will rebuild Apache config file and restart Apache.
Β
This is it and now if you visit your domain, you will see site pointing correctly.
Β
Hope this helps you.
Β
Do comment below giving your feedback.
Β
Happy Learning !!
Thank You !!