windows nginx 安装和使用
1. 安装1.1 安装php,自己下载,修改配置文件
;cgi.fix_pathinfo=1
将分号去掉
1.2 安装nginx,自己下载,修改配置文件
location / {
root html; #这里是站点的根目录
index index.html index.htm;
}
将下面代码注释#去掉,并且把/scripts改为$document_root
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
2. 使用
2.1 启动
开启cgi
<img alt="" src="http://www.sunhaibing.com/wp-content/uploads/2014/01/b41f14a99d67184da37bc1624915c092.jpg" />
去nginx目录,执行nginx.exe
2.2 停止nginx
直接kill进程
或者
命令行:nginx.exe -s quit
查看完整版本: windows nginx 安装和使用
Tags: nginx