配置例子

server {
    listen 80;
    server_name localhost;
    userid on;
    userid_name SESSIONID;
    userid_domain localhost;
    userid_path /;

    client_max_body_size 100k;

    hi_need_cache on;
    hi_cache_size 10;
    hi_cache_expires 300s;
    hi_need_kvdb off;
    hi_kvdb_size 10;
    hi_kvdb_expires 5m;
    hi_need_headers off;
    hi_need_cookies off;
    hi_need_session off;
    hi_session_expires 300s;
    hi_redis_host 127.0.0.1;
    hi_redis_port 6379;
    hi_java_classpath "-Djava.class.path=.:/usr/local/nginx/java:/usr/local/nginx/java/hi-nginx-java.jar";
    hi_java_options "-server -d64 -Xms512m -Xmx512m -Xmn170m";
    hi_java_servlet_cache_expires 300s;
    hi_java_servlet_cache_size 10;
    hi_java_version 8;
    hi_lua_package_path '/usr/local/nginx/lua/?.lua;';
    hi_lua_package_cpath '/usr/local/nginx/lua/?.so;';



    location ~ \.py$ {
        rewrite ^/(.*)\.py$ /$1 break;
        hi_python_script python/index.py;
    }
    location ~ \.lua$ {
        rewrite ^/(.*)\.lua$ /$1 break;
        hi_lua_script lua/index.lua;
    }
    location ~ \.php$ {
        rewrite ^/(.*)\.php$ /$1 break;
        hi_php_script php/index.php;
    }
    location ~ \.jsp$ {
        rewrite ^/(.*)\.jsp$ /$1 break;
        hi_java_servlet_cache_expires 60s;
        hi_java_servlet hi/index;
    }
    location ~ \.do$ {
        rewrite ^/(.*)\.do$ /$1 break;
        hi cpp/index.so;
    }

    location / {
        hi_javascript_lang javascript;
        hi_javascript_extension js;
        hi_javascript_compiledscript_expires 5m;
        hi_javascript_script javascript/index.js;
        #hi_javascript_content "hi_res.content='hello,world';hi_res.status=200;";
    }


}

results matching ""

    No results matching ""