windows下nginx+php的安装

1. 在nginx官方网站下载nginx的zip包 http://nginx.org/download/nginx-0.8.52.zip

2. 解压在d:/nginx

3. 在d:/nginx下建立两个.bat文件,用于启动和结束nginx

 

以下是start-nginx.bat

 

以下是stop-nginx.bat

 

4. 修改d:/nginx/conf/nginx.conf

 

 

注意:

nginx.conf中server_name不可以配置中文,否则.php文件可以访问,但是.css等文件访问会出500错误,日志中显示:

No mapping for the Unicode character exists in the target multi-byte code page

 

至此,完成nginx的安装

 

==========================================================

PHP安装我比较偷懒,直接使用xampp,下载地址:http://www.apachefriends.org/zh_cn/xampp.html

下载后解压缩到d:/xampp

 

还要下载一个RunHiddenConsole.exe,下载地址:http://www.box.net/shared/vfvqyjhday

用于运行时隐藏dos控制台.放到 d:/xampp/php/RunHiddenConsole.exe

 

==========================================================

双击d:/nginx/start-nginx.bat运行nginx

 

写一个phpinfo();测试,运行良好 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章