1.下载:
http://nginx.org/download/nginx-1.8.0.zip
2.解压到:
D:/nginx-1.8.0
3.运行命令:
cd nginx start nginx
常用命令:
nginx -s stop // 停止nginx nginx -s reload // 重新加载配置文件 ,只能在运行时执行 nginx -s quit // 退出nginx
4.修改根目录:
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;
}以上就介绍了windows 下nginx配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号