CodeIgniter nginx 404
默认情况下CI 不支持路由模式需要在server里面配置,配置成如下即可:
server
{
listen 80 ;
server_name wechat.XX.com.cn;
root XX;
index index.html index.php;
location ~ \.php($|/) { fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
} if (!-e $request_filename) {
rewrite "^/(.*)$" /index.php last;
break;
} location /status {
stub_status on;
access_log off;
} location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} access_log /home/wwwlogs/XX/access.log access; }
如此配置下就可以用了
CodeIgniter nginx 404的更多相关文章
- Debian中CodeIgniter+nginx+MariaDB+phpMyAdmin配置
本文不讲述软件安装过程,记述本人在Debia中配置CodeIgniter时遇到的问题及解决方法,希望能够为有需要的人提供帮助. 一.Debian版本及所需的软件 Debian 9.8 stretch ...
- codeigniter nginx rewrite规则配置【转】
转自:http://www.nginx.cn/1134.html nginx如何配置才能支持codeigniter ? 1. codeigniter的url美化去掉index.php 1 2 3 ...
- magento 1.9 nginx 404
原来的nginx 配置 lnmp 环境默认的 location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fast ...
- nginx 404重定向到自定义页面
在访问时遇到上面这样的404错误页面,我想99%(未经调查,估计数据)的用户会把页面关掉,用户就这样悄悄的流失了.如果此时能有一个漂亮的页面能够引导用户去他想去的地方必然可以留住用户.因此,每一个网站 ...
- linux nginx 404错误页面设置
配置nginx 实现404错误 返回一个页面 1.配置nginx.conf 在http代码块 添加 fastcgi_intercept_errors on; 2.在网站的sever代码块 添加 err ...
- Nginx 404 500
Nginx反向代理自定义404错误页面 http中添加 proxy_intercept_errors on; server中添加 error_page 404 = https://www.longda ...
- Nginx 404 Not Found 解决办法
环境:宝塔Nginx面板 解决办法: 宝塔面板--站点设置-配置文件. 去掉: error_page 404 /404.html; 前面的 # 号.
- codeigniter nginx配置
转载:http://www.nginx.cn/1134.html server{ listen 80; server_name www.ci.oa.com; access_log /usr/local ...
- nginx 404 403等错误信息页面重定向到网站首页或其它事先指定的页面
server { listen 80; server_name www.espressos.cn; location / { root html/www; index index.html index ...
随机推荐
- 服务器响应头隐藏X-power-by
服务器响应头隐藏X-power-by 这个不是Apache或者Nginx输出的,而是由语言解析器或者应用程序框架输出的. 这个值的意义用于告知网站是用何种语言或框架编写的.例如: PHP标准输出是:X ...
- IE8下使用webuploader点击无反应的解决方法。
在IE8开头添加如下代码. <meta http-equiv="X-UA-Compatible" content="IE=edge"> 即可解决,亲 ...
- mysql错误用法insert into where
mysql中给表中插入数据,一般使用insert into. 但是在插入数据时,有时会根据条件来插入数据,比如insert into t_person(num,name) values(1,'lily ...
- Linux设置静态IP
在做项目时由于公司局域网采用自动获取IP的方式,导到每次服务器重启主机IP都会变化.为了解决这个问题,我参考了http://blog.sina.com.cn/s/blog_537977e50100qh ...
- 加密和ssl机制细节
1.1 背景知识 对称加密:加密解密使用同一密钥,加解密速度快.随着人数增多,密钥数量急增n(n-1)/2 非对称加密:使用公私钥配对加解密,速度慢.公钥是从私钥中提取出来的,一般拿对方公钥加密来保证 ...
- lucene源码地址
http://archive.apache.org/dist/lucene/java/
- 手把手教你用axis1.4搭建webservice(转)
1.先下载axis jar包:axis-bin-1_4.zip.下载地址: http://ws.Apache.org/axis/. 当然这个包其实是不全面的,像activation.jar之类的,完全 ...
- iOS 设置button文字过长而显示省略号的解决办法
UIButton * button =[UIButton buttonWithType:UIButtonTypeCustom];button.titleLabel.adjustsFontSizeToF ...
- ajax头像上传
html代码: <input id="fileinput" type="file" /><br /> <br /> < ...
- shell脚本批量处理字符串
上周五运营那边给了一份手机号码的excle,要求查询出所有对应于用户编号的用户的信息.这个时候遇到了一个问题就是,需要查询的用户数量很多,不可能一个一个去查,而excle中的格式又不符合sqlquer ...