1. Download the Software
Required software is nginx,php,mysql (if not required)
Nginx.org,www.php.net on the top.
Unzip it all.
PHP basically do not have to make any changes (download the direct decompression version)
Use the cmd command in the Nginx directory to execute start Nginx.exe can start Nginx, notice whether 80 port is occupied, boot successfully run localhost in the browser can open the Nginx default page
However, it is not possible to run the PHP file yet, it needs to be configured to continue
2. Configure Nginx
In the nginx.conf file, locate the following commented code, modify the root to absolute path, and set Script_filename to replace with $document_root after
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
Location ~ \.php$ {
Root e:/phptools/nginx-1.13.4/html;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root/$fastcgi _script_name;
Include Fastcgi_params;
}
3. Running the Software
The cmd command executes the start Php-cgi.exe-b 127.0.0.1:9000-c in the PHP installation directory php.ini
cmd command in the Nginx installation directory execution nginx.exe-s stop first the nginx process just started off, and then restart the start Nginx.exe
To this, Nginx + PHP configuration is complete. You can then install MySQL to develop it.
Reference: http://www.nginx.cn/doc/setup/nginx-windows.html
Install Nginx + PHP under Windows