操作系统:win7 64位
数据库:mysql (安装配置不在此详述)
php5.5.30ns (安装配置不在此详述)
问题的关键是:nginx 服务器与 php的关联
一、服务器软件 nginx-1.11.4
下载地址 http://nginx.org/en/download.html
下载windows 版本nginx并解压,打开nginx.exe cmd 中输入 start nginx。打开浏览器输入 localhost 看到如下界面即表示,nginx安装成功!
(注意80端口占用问题,可在conf文件夹下的nginx.conf文件中进行相关配置)
三、在nginx配置文件中,配置pathinfo 访问模式,使得web服务器支持ThinkPHP
location ~ ^.+.php {
root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_split_path_info ^(.+.php)(.*)$;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;这个要换成你自己的 站路径
fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;include fastcgi_params;}
#原来的配置注释掉
# location ~ .*.php{
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /script$fastcgi_script_name;
# include fastcgi_params;
# }
文章知识点与官方知识档案匹配,可进一步学习相关知识MySQL入门技能树首页概览31449 人正在系统学习中 相关资源:橘子快速启动软件(橘子启动器)v3.0绿色免费版-其它代码类资源…
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!