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. Python 爬取拉钩网工作岗位

    如果拉钩网html页面做了调整,需要重新调整代码 代码如下 #/usr/bin/env python3 #coding:utf-8 import sys import json import requ ...

  2. NX二次开发-UFUN创建圆柱UF_MODL_create_cyl1

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_obj.h> #include <u ...

  3. hdu6110

    #include <cstdio> #include <iostream> #include <cmath> #include <cstring> #i ...

  4. Mybatis笔记 - Mybatis框架简介

    MyBatis 本是apache的一个开源项目iBatis, 2010年这个项目由apache software foundation 迁移到了google code,并且改名为MyBatis,实质上 ...

  5. PAT_A1064#Complete Binary Search Tree

    Source: PAT A1064 Complete Binary Search Tree (30 分) Description: A Binary Search Tree (BST) is recu ...

  6. Spring Cloud Eureka 注册安全一定要做到位!

    /eureka/ 参考配置如下: defaultZone: http://javastack:javastack@eureka1:8761/eureka/, http://javastack:java ...

  7. 《转》python学习基础

    学习的python本来想自己总结,但是发现了一篇不错的大牛的博客,拿来主义,,又被我实践了 关于前两篇如果总结的不详细,因此把他人的转载过来 http://www.cnblogs.com/BeginM ...

  8. Apache Spark 2.2.0 中文文档 - Spark SQL, DataFrames and Datasets

    Spark SQL, DataFrames and Datasets Guide Overview SQL Datasets and DataFrames 开始入门 起始点: SparkSession ...

  9. override new 的区别

    override : 方法提供从基类继承的成员的新实现. 通过 override 声明重写的方法称为重写基方法. 重写基方法必须具有与 override方法相同的签名 new : 关键字可以显式隐藏从 ...

  10. Android开发 navigation的跳转动画实现

    前言 此篇博客只简短的介绍navigation如何添加跳转页面的动画属性,如果你还为接触了解过navigation.建议你看我另一篇博客Android开发 navigation入门详解 创建动画xml ...