This article shows you how to quick install and integrate Nginx and PHP on Windows-based systems.
1. Install Nginx + PHP
Basically, just download zip file and extracts it, no installation.
To install Nginx
Visit nginx.org
Download toc:\web
nginx/Windows-1.19.8.zip
Extract to C:\web
2. To Install PHP
Visit php.net
Download PHP For Windows: Binaries and sources Releases (7.4 -nts-vc15-x64)
Extract to C:\webphp
Edit file c:\web\conf\nginx.conf
location / {
root html;
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;
}
Then run:
php-cgi.exe -b 127.0.0.1:9999
and run nginx…
start c:\web\nginx.exe