#CI
server {
        listen      80;
        server_name www.ci.com;
        index       index.php index.html index.htm;
        root        "/servers/apps/CI";
      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 模式的重点

}      
}

nginx.conf 加入

#禁止IP访问
server
{
  listen 80 default;
  server_name _;
  return 500;
}

server 加在 http 中

http
{
server{}
}

Nginx 支持 CI 框架的配置并禁止使用 ip 访问的更多相关文章

  1. nginx支持ssl双向认证配置

    nginx支持ssl双向认证配置 listen 443; server_name test.com; ssl on; ssl_certificate server.crt; //server端公钥 s ...

  2. nginx安全:配置allow/deny控制ip访问(ngx_http_access_module)

    一,nginx中allow/deny指令的用途 1, Nginx的deny和allow指令是由ngx_http_access_module模块提供, Nginx安装默认内置了该模块 2, nginx访 ...

  3. nginx 禁止某IP访问

    首先建立下面的配置文件放在nginx的conf目录下面,命名为blocksip.conf: deny 95.105.25.181; 保存一下. 在nginx的配置文件nginx.conf中加入:inc ...

  4. 【转载】 腾讯云通过设置安全组禁止某些IP访问你的服务器

    有时候我们在运维网站的过程中会发现一些漏洞扫描者的IP信息,或者个人爬虫网站的IP信息,此时我们想禁止掉这些IP访问到你的服务器,可以通过腾讯云的安全组功能来设置禁止这些IP访问你的服务器,也可以通过 ...

  5. CentOS6.5 配置防火墙+允许指定ip访问端口

    参考博文: iptables防火墙只允许指定ip连接指定端口.访问指定网站 一.配置防火墙 打开配置文件 [root@localhost ~]# vi /etc/sysconfig/iptables ...

  6. apache禁止使用IP访问的实现方法

    apache禁止访问目录列表 apache禁止访问目录列表对于开发人员来说还是蛮实用的,可以迅速查找根目录下的所有项目,但如果一个挂在互联网上的服务器为了提高安全性就必须禁止访问目录列表. 找到Apa ...

  7. 踢出某正在访问的用户||永久禁止某IP访问

    转至:https://blog.csdn.net/weixin_34408717/article/details/85527305?utm_medium=distribute.pc_aggpage_s ...

  8. Linux 防火墙设置,禁止某个ip访问

    service  iptables  status        查看防火墙状态 service  iptables  start           开启防火墙 service  iptables  ...

  9. 【转载】 禁止国外IP访问你的网站

    在网站的运维过程中,我们通过网站记录的IP列表记录有时候会发现很多国外的IP的访问,如美国的IP等,而很多的服务器攻击行为的发起点很有可能在国外,此时为了服务器安全的考虑,我们可以考虑禁止国外IP访问 ...

随机推荐

  1. HTTP下载文件名称编码说明

    HTTP下载保存文件名 下载文件需要保存的名称 在响应报文头中 Content-Disposition 响应报文头域中指定, 例如 Content-Disposition: attachment; f ...

  2. HTTPS强制安全策略-HSTS协议阅读理解

    https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security [阅读理解式翻译,非严格遵循原 ...

  3. MVC筛选自定义属性下拉表

    MVC筛选自定义属性下拉表 string CompanyId = ""; CompanyId = ManageProvider.Provider.Current().Company ...

  4. android 加载大图片

    引用:http://my.eoe.cn/littlebirds/archive/4646.html 尽量不要使用setImageBitmap或setImageResource或BitmapFactor ...

  5. Visual Studio C#的winform/webform/asp.net控件命名规范

    控件命名规范 类型 前缀 示例 AdRotator adrt adrtTopAd Button btn btnSubmit Calendar cal calMettingDates CheckBox ...

  6. sysobjects中字段的含义

    --列名 数据类型 描述 name sysname --对象名. Id int --对象标识号. xtype ) --对象类型.可以是下列对象类型中的一种: C = CHECK --约束 D = -- ...

  7. google 提供webrtc 的实例使用 turnserver的方式

    google的turnserver 下载方式:svn checkout http://rfc5766-turn-server.googlecode.com/svn/branches/v3.2/ rfc ...

  8. 安装ntp服务,并设置ntp客户端

    1.yum安装ntp [root@localhost ~]# yum install ntp 2.修改配置文件 配置文件在/etc/ntp.conf

  9. noi 1768 最大子矩阵

    题目链接:http://noi.openjudge.cn/ch0206/1768/ 可能是数据修改了吧,O(n6)过不了了. 主要是在求一个矩阵的和时,重复计算了很多次. 矩阵首先压缩一下.在输入的时 ...

  10. NSDate获取当前时区的时间

    [NSDate date]获取的是GMT时间,要想获得某个时区的时间,以下代码可以解决这个问题 NSDate *date = [NSDate date]; NSTimeZone *zone = [NS ...