Running php-cgi on port 9000
Netstat gives me
TCP 127.0.0.1:9000 DESKTOP-xxxxxxx:0 LISTENING
[php-cgi.exe]
nginx.conf
http://pastebin.com/wkfz8wxw
Every php file gives me this No input file specified.
error...
Changed SCRIPT_FILENAME
to SCRIPT_NAME
and no succes..
I am on Windows 10 Home x64
You need to set a document root with the root
directive, either within your location ~ \.php$
block or inherited from the outer server
block.
The solution may be to move the root c:/Users/Youri/PhpstormProjects;
line out of your location /
block into a position above it.
Usually fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
is the correct method to specify the full path to the script, whereas SCRIPT_NAME
is usually just the last element.
Like this:
server {
...
root c:/Users/Youri/PhpstormProjects;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Set root directive with absolute path in windows PC. Check for the case or any typing mistake in the path. Reload the nginx process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With