How can I build Windows 7 + nginx + php? Operating system: window7 ??? Php5.4.17 ???? Nginx1.5.2 ?? Download and Download php. Address: www. php. netdownloads. php first creates a folder named "wnmp" on the E drive, and then decompress PHP to the modified file. Download nginx at: win7 + nginx + php
?
Operating system: window7 ??? Php5.4.17 ???? Nginx1.5.2
?
? Download
?
?
- Create the "nginx" folder in the wnmp folder and decompress nginx to the change folder.
Configuration?
Nginx requires cgi php, so you need to change the following content:
enable_dl = Oncgi.force_redirect = 0cgi.fix_pathinfo=1fastcgi.impersonate = 1cgi.rfc2616_headers = 1
? The PHP configuration has come to an end, and nginx is configured.
?
- Start nginx first, use DOS to enter the nginx path, and run the following command to start nginx
Nginx-s reload // restart Nginxnginx-s stop // pause nginx-s quit // exit nginxstart nginx // start
? Enter 127.0.0.1 in the address bar of the browser to display the interface, which indicates that nginx is started normally.
- Nginx accesses the index. php file under E: \ wnmp \ nginx \ html \ index.html by default.
- Modify the nginx. conf (E: \ wnmp \ nginx \ conf \ nginx. conf) file to configure the website.
Events {worker_connections 1024;} http {include mime. types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server {listen 80; server_name localhost; # Local IP root E:/wnmp/www; # store the website's root directory location/{index. php index.html index.htm; # Add index. php. # Autoindex on; # list the directory structure if the file does not exist;} location ~ \. Php $ {fastcgi_pass 127.0.0.1: 9000; # fastcgi and the listening port must be consistent with the fastcgi_index index when php cgi is started. php; fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; include fastcgi_params ;}}}
?
? So the configuration is complete.
?