1. Download:
http://nginx.org/download/nginx-1.8.0.zip
2. Unzip to:
D:/nginx-1.8.0
3. Run command:
cd nginx start nginx
Common commands:
nginx -s stop // 停止nginx nginx -s reload // 重新加载配置文件 ,只能在运行时执行 nginx -s quit // 退出nginx
4. Modify the root directory:
location / { root D:/html; index index.html index.htm inde.php; }
location ~ \.php$ { root D:/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
The above introduces the nginx configuration under windows, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.