DDSameera's avatar

Virtual Host No input file specified

I created CPANEL Virtual host in here . /etc/apache2/conf.d/userdata/std/2_4/trialvoiceofguru/trial.xxxxx.com/trial.xxxxxx.com.conf

after that i restart appache and check the domain http://trial.xxxxxxxx.com/

It shows the "No input file specified."

Here is the error log results

[Sat Jan 09 00:37:30.677456 2021] [proxy_fcgi:error] [pid 25328] [client 124.43.215.213:11389] AH01071: Got error 'Unable to open primary script: /home/trialvoiceofguru/public_html/public/index.php (No such file or directory)'

But actuall i can see "index.php" file in this location https://snipboard.io/Wlp46B.jpg

PLease help me to resolve this

0 likes
26 replies
Tray2's avatar

Does the file have the correct owner and permissions?

1 like
Tray2's avatar

Then go to the directory where you have the index.php file and write

pwd

If it doesn't show you this path then you are pointing to the wrong directory in your virtual host.

/home/trialvoiceofguru/public_html/public
DDSameera's avatar
ServerName trial.xxxxxx.com
ServerAlias trial.x.comxxxxx
DocumentRoot /home/trialvoiceofguru/public_html/public
 <Directory /home/trialvoiceofguru/public_html/public>
   Options -Indexes +FollowSymLinks
   AllowOverride All
   #Disable index view
   options -Indexes
   #hide a Specifuc File
   <Files .env>
      order allow,deny
      Deny from all
   </Files>
   </Directory>
   
ErrorLog /home/trialvoiceofguru/public_html/error.log
CustomLog /home/trialvoiceofguru/public_html/requests.log combined


@tray2 , here is my conf file

Tray2's avatar

What happens if you add this line to your virtual host under DocumentRoot.

DirectoryIndex  index.php
DDSameera's avatar
[Sat Jan 09 04:23:34.462153 2021] [proxy_fcgi:error] [pid 12177] [client 124.43.97.249:14557] AH01071: Got error 'Unable to open primary script: /home/trialvoiceofguru/public_html/public/index.php (No such file or directory)'

Tray2's avatar

If you run these commands then try again?

mkdir -p /home/trialvoiceofguru/public_html/public/
echo '<?php phpinfo();' > /home/trialvoiceofguru/public_html/public/index.php
Snapey's avatar

try ls -la index.php

Maybe index.php is not owned by the webserver

It doesn't show in the list of files on your web server ;-)

DDSameera's avatar

i can see index.php @snapey

Here is the error

[Sat Jan 09 05:55:57.226694 2021] [proxy_fcgi:error] [pid 6628] [client 124.43.97.249:15883] AH01071: Got error 'Unable to open primary script: /home/trialvoiceofguru/public_html/public/index.php (No such file or directory)'
Tray2's avatar

Did you run the commands I asked you to do?

If you run these commands then try again?

mkdir -p /home/trialvoiceofguru/public_html/public/
echo '<?php phpinfo();' > /home/trialvoiceofguru/public_html/public/index.php

What do you get?

sr57's avatar

What gives 'ls -la /home/trialvoiceofguru/public_html/public/index.php'

DDSameera's avatar

@sr57

[root@lexionmetal ~]# ls -la /home/trialvoiceofguru/public_html/public/index.php
-rwxrwxrwx 1 trialvoiceofguru root 1731 Jan  8 23:13 /home/trialvoiceofguru/publ                                            ic_html/public/index.php

sr57's avatar

Have you set up /etc/httpd/conf.d/php.conf ?

DDSameera's avatar

Its automatically created by cpanel


# This file was automatically generated by the Cpanel php
# Configuration system.  If you wish to change the way php is being
# handled by Apache on your system, use the
# /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface.
#
# Manual edits of this file will be lost when the configuration is
# rebuilt.

# These initial handlers serve as fallback in case there is any
#  time between when configuration has changed and when it takes effect.
# We use CGI style since it is simple and the default we use elsewhere.
# If the version is not set to CGI they will get a 404 until the new
#  configuration takes effect which is better than serving source
#  code until the new configuration takes effect.
<IfModule actions_module>
  Action application/x-httpd-ea-php73 /cgi-sys/ea-php73
  Action application/x-httpd-ea-php74 /cgi-sys/ea-php74
</IfModule>

# suPHP configuration for ea-php73
<IfModule suphp_module>
  suPHP_Engine on
  <Directory />
    suPHP_AddHandler application/x-httpd-ea-php73
  </Directory>
</IfModule>

# Set ea-php74 as the system default for php
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# CGI configuration for ea-php74
<IfModule actions_module>
  Action application/x-httpd-ea-php74 /cgi-sys/ea-php74
</IfModule>


# End of autogenerated php configuration.

sr57's avatar
sr57
Best Answer
Level 39

Maybe a bug of fatscgi, I should test without this module.

1 like
DDSameera's avatar

Yes @sr57 , i tried 06 hours. all effort failed :(

is that possible me to run this laravel application in different way . without PHP FGI

Tray2's avatar

Mark the answer that helped you as best.

1 like

Please or to participate in this conversation.