Blog

Solved – No input file specified in Magento2, How to solve proxy_fcgi:error AH01071: Got error ‘Unable to open primary script

 
 
 
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 !!

Leave a Reply

Your email address will not be published. Required fields are marked *