win下nginx+php
来源:互联网 发布:淘宝买车可靠吗 编辑:程序博客网 时间:2024/06/04 17:51
1、分别下载nginx和php的安装包(两个都是解压即可用)
2、配置php
将php.ini-development文件复制并重命名为php.ini,并用Notepad++(没有安装此软件的话就使用记事本)打开php.ini:
3、配置Nginx
Nginx的配置文件是在安装目录的conf文件夹下的nginx.conf,并用Notepad++(没有安装此软件的话就使用记事本)打开它:
找到
location / { root html; index index.html index.htm; }
改为
location / { root html; index index.html index.htm index.php; }
找到
#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; #}
改为
location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
4、Nginx和php-cgi的bat批处理快速启动方法
start_nginx_php.bat
@echo offset php_home=D:/WNMP/php(php的解压路径)set nginx_home=D:/WNMP/nginx(nginx解压路劲)REM Windows 下无效REM set PHP_FCGI_CHILDREN=5REM 每个进程处理的最大请求数,或设置为 Windows 环境变量set PHP_FCGI_MAX_REQUESTS=1000echo Starting PHP FastCGI...RunHiddenConsole %php_home%/php-cgi.exe -b 127.0.0.1:9000 -c %php_home%/php.iniecho Starting nginx...RunHiddenConsole %nginx_home%/nginx.exe -p %nginx_home%
stop_nginx_php.bat
@echo offecho Stopping nginx... taskkill /F /IM nginx.exe > nulecho Stopping PHP FastCGI...taskkill /F /IM php-cgi.exe > nulexit
http://www.wanghailin.cn/nginx-phpcgi-batfaststart/
http://www.tuicool.com/articles/YBJ3Yn
0 0
- win下nginx+php
- 教程:在Win下搭建Nginx+PHP环境.
- Win+Nginx+PHP+MySQL环境搭建
- 1. Win+Nginx+PHP+MySQL环境搭建
- Win+Nginx+PHP+MySQL环境搭建
- win下 php安装mcrypt
- win下php扩展下载。。
- WIN下 Apache PHP 部署。
- PHP 下nginx 配置
- Win下apache+php+Tomcat配置
- win 平台下的 php 加速度eaccelerator
- win下php扩展vc6编译
- win下asp jsp php服务器
- win下Apache mysql PHP配置
- win下php扩展vc6编译
- Win下安装PHP的APC拓展
- 【PHP学习】Win下安装PEAR
- 【PHP学习】Win下安装PEAR
- python中去掉空格项目
- C语言实验题――大小写转换
- 从Log4j迁移到LogBack的理由
- spring,mybatis事务管理配置与@Transactional注解使用
- 机房那些事儿---清空combobox
- win下nginx+php
- installation guide 研读
- Bmob与环信的联合使用--头像昵称的显示
- 2016最后一天
- 坚持是一种修行
- 考研总结
- 在app内展示ppt
- js中事件使用return;return false;return true的区别
- NGUI插件的目录结构及对于NGUI基本控件的理解(UIButton)