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

    }

  • 相关阅读:
    python给邮箱发送消息
    shell 的echo和 printf
    shell 基本运算符
    shell傳遞參數
    shell變量和數組
    pycharm的放大和缩小字体的显示 和ubunt的截圖工具使用 ubuntu上安装qq微信等工具
    flask的g对象
    mysqlcilent的安装
    Ubuntu安装 和 python开发
    使用python来建立http服务
  • 原文地址:https://www.cnblogs.com/xingchong/p/8489900.html
Copyright © 2011-2022 走看看