QUESTION :
I want to setup a web dev environment on my Windows 10 PC. On my 2nd hard drive (D:WebDev
) I have the following:
This is how my NginX is configured: http://pastebin.com/raw.php?i=JFSX6hfU
So, this is the contents of my start.bat file:
@ECHO OFF
set PATH=D:WebDevphp-5.6.16;%PATH%
ECHO Starting...
RunHiddenConsole.exe D:WebDevphp-5.6.16php-cgi.exe -b 127.0.0.1:9000
RunHiddenConsole.exe D:WebDevphp-5.6.16php-cgi.exe -b 127.0.0.1:9001
RunHiddenConsole.exe D:WebDevphp-5.6.16php-cgi.exe -b 127.0.0.1:9002
RunHiddenConsole.exe D:WebDevphp-5.6.16php-cgi.exe -b 127.0.0.1:9003
RunHiddenConsole.exe D:WebDevphp-5.6.16php-cgi.exe -b 127.0.0.1:9004
RunHiddenConsole.exe D:WebDevmariadb-10.1.9binmysqld --defaults-file=D:WebDevmariadb-10.1.9my.ini --standalone --console
cd D:WebDevnginx-1.9.7 && START /B nginx.exe && cd ..
This was put together based on https://stackoverflow.com/questions/15819351/can-windows-php-fpm-serve-multiple-simultaneous-requests/33032959#=
When I run start.bat
file, NginX and MariaDB is getting started (i’ve verified by visiting http://localhost
and I can see the index.html
being served) and I can connect to the MariaDB Server (mysql) with Navicat.
The only thing that isn’t working is the PHP. Firstly, I cannot see any PHP processes in the task manager and when I visit phpinfo()
page, I get the error:
No input file specified.
Any idea what might be wrong?
ANSWER :
After seeing you nginx.conf
file in link above, I think the problem is that you do not define root
under location ~ .php$
, Since you root directory is same in different locations you can define it once under server
section.
So
Edit nginx.conf
move line:
root D:/WebDev/projects/localhost;
under
server {