nginx安装ci,开启pathinfo模式
来源:互联网 发布:韩佐 软件 证据 编辑:程序博客网 时间:2024/05/08 05:40
1.根据教程安装:http://codeigniter.org.cn/user_guide/installation/index.html
2.修改nginx配置:server {
listen 80;
server_name localhost;
rewrite_log on;
#根目录
root /usr/share/nginx/html/www;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php;
location = /index.php {
fastcgi_pass 127.0.0.1:9000;
#ci的路径
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/www/CodeIgniter$fastcgi_script_name;
include fastcgi_params;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
3.根据官网提示(https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/)修改config文件:
$config['base_url'] = "";$config['index_page'] = "";$config['uri_protocol'] = "AUTO";按照以上步骤可以开启nginx的pathinfo模式,此时http://xxxxx/index.php/about可以跳到about.php文件,http://xxxxxxx/index.php/home可以跳到home.php文件
- nginx安装ci,开启pathinfo模式
- nginx下开启pathinfo模式
- TPshop5最新版 安装 nginx 开启PATHINFO 模式资源加载路径加载失败问题,适用tp3.2PATHINFO模式REWRITE模式
- NGINX 开启PATHINFO
- nginx开启pathinfo
- lnmp nginx 开启pathinfo
- nginx开启pathinfo模式的两种方式
- Lnmp开启pathinfo模式
- Nginx 支持pathinfo模式
- Nginx支持pathinfo模式
- nginx支持pathinfo模式
- nginx配置pathinfo模式
- nginx下pathinfo模式
- 配置nginx支持pathinfo模式
- 配置nginx支持pathinfo模式
- nginx搭建pathinfo模式支持
- 配置nginx支持PATHINFO模式
- 配置Nginx支持pathinfo模式
- JavaScript对象的创建方式
- stm32_NVIC中段优先级
- 一个简单易用的android任务管理器—tractor
- node.js入门总结
- Assembly x64 Intro - Dct.asm of OpenH264 Encode
- nginx安装ci,开启pathinfo模式
- 站在哲学的角度看,技术的本质是什么?
- SQLServer单用户模式导致服务器连接失败
- 蓝牙4.0备忘。
- iOS runtime 机制
- 使用shell和awk批量处理二进制数据
- groovy配置安装
- PHP遍历select
- effective c++ 学习笔记2