nginx for windows的配置
1 .下载nginx for windows,下载地址:http://www.kevinworthington.com/wp-content/uploads/2009/04/nginx-0747-win32-setup.exe2.安装nginx
3.安装php及mysql
4.修改安装目录下conf下的nginx.conf配置文件
5.配置说明
location ~ \.php$ {
root F:/www/APMServ5.2.6/www/htdocs; #网站跟目录
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME F:/www/APMServ5.2.6/www/htdocs$fastcgi_script_name;
include fastcgi_params;
}
6.创建批处理bat
start.bat(启动nginx,php-cgi,mysql)
#=======================================
@echo off
echo php-cgi 正在启动 ...
F:\www\APMServ5.2.6\PHP\RunHiddenConsole.exe F:/www/APMServ5.2.6/PHP/php-cgi.exe -b 127.0.0.1:9000 -c F:/www/APMServ5.2.6/PHP/php.ini
#上面命令大致是运行隐藏控制台工具,开启php-cgi进程,监听9000端口,进程启动后,隐藏控制台
echo php-cgi 启动完成 ...
echo nginx 正在启动 ...
C:/nginx/nginx.exe
echo nginx 启动完成 ...
net start mysql
echo 启动完成
#===================================
页:
[1]