nginx nginx.conf配置*:
json格式 :http{}
include mime.types; 支持include子文件
include vhost/vhost_*.conf; 支持正则语法
server_names_hash_bucket_size 128; 128负? server_names_hash_bucket_size 128;
keepalive_timeout 20; 支持长连接参数(秒);鼐獠问?
一个简单的 vhost_*.conf示例:
server {
listen 80;
server_name www.***.com;
index index.html index.htm index.jsp;
charset UTF-8;
root /***/***/**.***.***;
log_format stat "$args&ip=$http_X_Forwarded_For&time=$time_local";
access_log /data/logs/**/access.log stat;
proxy_buffer_size 8k;
proxy_buffers 32 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
proxy_read_timeout 180;
rewrite ^/stat.php(.*)$ /stat.html$1 last;
location /stat.html {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_X_Forwarded_For;
}
}