博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nginx下 使用CI
阅读量:7044 次
发布时间:2019-06-28

本文共 845 字,大约阅读时间需要 2 分钟。

hot3.png

nginx 默认不支持PATH_INFO 那么不能正常使用CI。 更改nginx.conf 配置 server { listen 80; server_name localhost; index index.php index.html index.htm; root /Users/renfrank/Sites/; location ~ .php{ fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; ##########################################pathinfo 模式 set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?.php)(/.+)$"){ set $real_script_name $1; set $path_info $2; } include fastcgi.conf; fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; ##########################################nginx支持pathinfo 模式的重点

}

}

同时CI 中 config.php $config['base_url'] = ''; $config['index_page'] = 'index.php'; $config['uri_protocol'] = 'PATH_INFO';

转载于:https://my.oschina.net/ren2881971/blog/293938

你可能感兴趣的文章
分享一篇IBM的论文,关于Docker性能的测试
查看>>
python学习笔记-Day18 -django(第一部分)
查看>>
python3.4 安装
查看>>
Python多版本管理软件pyenv的安装应用及pip的使用讲解
查看>>
规模虽小 但微信无法忽视易信来往的存在
查看>>
国家安全周 360或成最大受益者
查看>>
301/302 http会话跳转
查看>>
SQL Server 2008 R2占用内存越来越大两种解决方法
查看>>
关于思科××× client客户端错误 failed to enable virtual adapter
查看>>
sqlserver,你的delete语句表名为什么不能别名?
查看>>
migrations 命令的错误
查看>>
docker搭建LNMP环境
查看>>
图表配置(Chart)
查看>>
我的友情链接
查看>>
docker命令??
查看>>
mstsc远程连接服务器
查看>>
centos6 yum升级php5.3.3 到php5.4 的办法
查看>>
Android布局整合include界面控件(重用布局)
查看>>
vector.size() vector.capacity size_type vector.reserve()
查看>>
我的友情链接
查看>>