I am new to PHP and Laravel.I have cloned a laravel project from git and save my local directory
"C:\Projects\TestProject\public"
.
NGINX folder C:\nginx
php folder C:\PHP
My NGINX Config is as below
server {
listen 80;
server_name localhost;
root C:/Projects/TestProject/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9999;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
I have also installed composer and necessary dependecies.But when i try to access http://localhost/TestProject/public/index.php
its showing 404
and showing No input file specified.
I have created a sample php file Test.php with phpinfo()
int the same folder root.When i acces http://localhost/TestProject/public/Test.php
it is displaying the PHP information on browser but the network shows 404 for the url. My PHP version is 7.4.
You have to include the params' file in the configuration block:
Then the final block should be: