server {

listen 9090;

server_name i.com;

root /Users/chong/Documents/www;

# Load configuration files for the default server block.

location / {

index index.php index.html index.htm;

if (!-e $request_filename) {

#rewrite ^/index.php(.*)$ /index.php?s=$1 last;

#rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;

#rewrite ^(.*)$ /index.php?s=$1 last;

#rewrite ^(.*)$ /admin.php?s=$1 last;

#rewrite '^/admin.php(.*)$' /data.txt last;

#rewrite ^/images/(.*)_(\d+)x(\d+)\.(png|jpg|gif)$ /data.txt last;

rewrite ^/php/midou/admin.php(.*)$ /php/midou/admin.php?s=$1 last; #ok...

#rewrite ^/(.*) http://xy2.163.com permanent; #ok...

break;

}

autoindex on;

autoindex_exact_size on;

autoindex_localtime on;

}

location ~* \.php$ {

fastcgi_index index.php;

fastcgi_pass 127.0.0.1:9001;

include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;

}

error_page 404 /404.html;

location = /40x.html {

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

}

}

server {

listen 9090;

server_name i.com;

root /Users/chong/Documents/www;

# Load configuration files for the default server block.

location / {

index index.php index.html index.htm;

if (!-e $request_filename) {

rewrite ^/(.*)/index.php(.*)$ /$1/index.php?s=$2 last;

rewrite ^/(.*)/admin.php(.*)$ /$1/admin.php?s=$2 last; #ok...

#rewrite ^/(.*) http://xy2.163.com permanent; #ok...

break;

}

autoindex on;

autoindex_exact_size on;

autoindex_localtime on;

}

location ~* \.php$ {

fastcgi_index index.php;

fastcgi_pass 127.0.0.1:9001;

include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;

}

error_page 404 /404.html;

location = /40x.html {

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

}

}

补充:

代理对文件大小的限制,

server {
client_max_body_size 100M;
listen 9096;
server_name gate.chaohuoyy.com;

location / {
proxy_pass http://127.0.0.1/data/index.html;
}

location /svn {
proxy_pass http://192.168.1.95:8080/svn;
}

}

nginx i.com.conf的更多相关文章

  1. 配置 nginx server 出现nginx: [emerg] "root" directive is duplicate in /etc/nginx/server/blogs.conf:7

    在配置nginx 虚拟机时,执行 sudo /usr/sbin/nginx -t 报下面的错误: nginx: [emerg] nginx: configuration file /etc/nginx ...

  2. 阿里云centOS7.4 nginx: [emerg] "server" directive is not allowed here in /etc/nginx/vhost/xxxxxx.conf:2

    里云centOS7.4配置多个站点遇到的问题nginx: [emerg] "server" directive is not allowed here in /etc/nginx/ ...

  3. [root@offical nginx]# nginx -t nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1016001 in /usr/share/nginx/modules/mod-http-geoip.conf:1 nginx: con

    [root@offical nginx]# nginx -tnginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_mo ...

  4. nginx配置文件httpd.conf详解

     PS:Nginx使用有两三年了,现在经常碰到有新用户问一些很基本的问题,我也没时间一一回答,今天下午花了点时间,结合自己的使用经验,把Nginx的主要配置参数说明分享一下,也参考了一些网络的内容,这 ...

  5. 《亲测》nginx webscoket ssl conf配置示例

    非crt证书,用的pem,其中 http://localhost:5003 是你要转发到的站点网址 配置的就是 server { listen 80; server_name smarthome.yi ...

  6. nginx新建nginx_fzjh.conf文件,不使用默认配置文件

    worker_processes 4; events{ worker_connections 1024; } http{ server { listen 80; server_name myserve ...

  7. nginx 分离配置文件 conf.d和default.conf

    1. 在 nginx.conf 文件中引用 conf.d 下的所有配置文件 #在http配置节的末尾添加配置引用 http { ... #gzip on; include /etc/nginx/con ...

  8. Nginx 加载conf.d (内文件***.conf)

    include /usr/local/nginx/conf/conf.d/*.conf;

  9. nginx 的一个conf配置

    server { listen 80 default_server; server_name www.caipudq.cn caipudq.cn *.caipudq.cn; root /mnt/www ...

随机推荐

  1. NX二次开发-获取切换按钮的当前状态UF_MB_ask_toggle_state

    NX9+VS2012 1.打开D:\Program Files\Siemens\NX 9.0\UGII\menus\ug_main.men 找到装配和PMI,在中间加上一段 TOGGLE_BUTTON ...

  2. OpenStack与KVM的区别与联系

    转:https://www.aliyun.com/zixun/content/2_6_280418.html OpenStack与KVM都是目前IT界比较热门的两个词汇.它们都是开源的,都与Linux ...

  3. Go将统治下一个10年?Go语言发展现状分析

    “本文是国内Go语言大中华区首席布道师——许式伟,在QCon2015上海站上的分享.他预测Go语言10年内一定会超过C和java,并且统治这一个10年. Go语言语法及标准库变化 Go从1.0版本到现 ...

  4. (转)HashSet<T>类

    转载于:http://www.importnew.com/6931.html HashSet<T>类主要是设计用来做高性能集运算的,例如对两个集合求交集.并集.差集等.集合中包含一组不重复 ...

  5. 2015ACM/ICPC亚洲区沈阳站重现赛-HDU5512-Pagodas-gcd

    n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, l ...

  6. java-day15

    File类 文件和目录路径名的抽象表示,主要用于文件和目录的创建.查找和删除等操作 静态成员 static String pathSeparator 路径分隔符 File.pathSeparator ...

  7. 解决centos7没有显示ipv4的问题

    很多小伙伴再安装centos7的时候,都是一直默认安装.所以导致后来没有ipv4 那么到底什么原因呢,我最近找到了原因: 就是在这里没有选择: 将这个地方打开之后,就会有了,那么问题就是那个原因.如果 ...

  8. sql 特殊时间值 第一天或最后一天 无计算错误

    DECLARE @dt datetimeSET @dt=GETDATE() DECLARE @number intSET @number=3 --1.指定日期该年的第一天或最后一天--A. 年的第一天 ...

  9. fastjson转jackson

    使用fastjson有个内存oom的问题,我们应该尽量使用jackjson,为什么呢?因为fastjson会引发一个oom,很潜在的危险,虽然jackjson的api真的非常好用,对于解析json串来 ...

  10. jq的绑定动态元素

    在项目中经常会遇到需要在页面中插入动态元素的情况,比如页面中有一个按钮: <div id="btn">确定</div> 点击按钮时在body中插入一段div ...