Does the file have the correct owner and permissions?
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
Yest @tray2 , Everything is set correctly
This guide might point you in the right direction
https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-18-04-lamp/
@tray2 My OS is centos 7
This one is not helpful @tray2 ,
Then this one https://www.howtoforge.com/tutorial/apache-php-mysql-lamp-centos-7-4/
The basic are the same though.
Its not helpful @tray2
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
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
What happens if you add this line to your virtual host under DocumentRoot.
DirectoryIndex index.php
[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)'
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
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 ;-)
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)'
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?
What gives 'ls -la /home/trialvoiceofguru/public_html/public/index.php'
[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
Have you set up /etc/httpd/conf.d/php.conf ?
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.
Maybe a bug of fatscgi, I should test without this module.
Yes @sr57 , i tried 06 hours. all effort failed :(
is that possible me to run this laravel application in different way . without PHP FGI
@sr57 , I disabled CGI and Enable "Suphp" through the WHM panel . then I include my virtual host code. It works ! I can run my project without "public" word
Mark the answer that helped you as best.
@tray2 Done.
Please or to participate in this conversation.