win7+nginx+php Construction
?
Operating system: Window7??? php5.4.17???? nginx1.5.2
?
? download
?
?
- Create a folder named "Nginx" in the Wnmp folder and unzip the Nginx into the folder.
Configuration?
Because Nginx requires CGI PHP, you need to change a few things.
ENABLE_DL = Oncgi.force_redirect = 0cgi.fix_pathinfo=1fastcgi.impersonate = 1cgi.rfc2616_headers = 1
? To this point, the PHP configuration is over, then configure Nginx.
?
- First start Nginx, with DOS into the Nginx path, use the command to start Nginx
Nginx-s Reload//restart Nginxnginx-s stop//Pause Nginx-s quit//exit Nginxstart Nginx//start
? then enter 127.0.0.1 in the address bar of the browser to see the interface, indicating that Nginx is booting normally
- The default access for Nginx is the index.php file under E:\wnmp\nginx\html\index.html.
- Modify the nginx.conf (E:\wnmp\nginx\conf\nginx.conf) file to configure the site
Events { worker_connections 1024;} HTTP { include mime.types; Default_type Application/octet-stream; Sendfile on ; Keepalive_timeout ; server { listen ; server_name localhost; #本地IP root e:/wnmp/www; #存放网站的根目录 location /{ index index.php index.html index.htm; #添加index. php. #autoindex on; #如果文件不存在列出目录结构; } Location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; #fastcgi及监听的端口与php的cgi启动时要一致 Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params;}}} ?
? So the configuration is complete.
?