zoukankan      html  css  js  c++  java
  • nginx i.com.conf

    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;
    }

    }

  • 相关阅读:
    继承(JAVA)
    第一个Java应用
    Java面向对象编程
    学生管理系统(分层开发)
    ComboBox的数据联动
    二进制、八进制、十进制、十六进制之间的转换
    C# using的一些事
    JVM最多支持多少个线程?
    Java日志体系居然这么复杂?——架构篇
    java 架构之路(队列)kafka
  • 原文地址:https://www.cnblogs.com/xingchong/p/8489900.html
Copyright © 2011-2022 走看看