#user nobody;
worker_processes 4;
worker_cpu_affinity 0001 0010 0100 1000;
worker_rlimit_nofile 65535;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_min_length 1024;
gzip_buffers 4 8k;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on; #limit_zone crawler
#proxy_cache_path cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
#proxy_temp_path cache/tmp;
server {
listen 80;
#server_name 127.0.0.1;
#server_name localhost;
server_name 172.18.9.7;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://172.18.9.7:8080;
#proxy_cache my-cache;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
#proxy_cache_valid 200 302 60m;
#proxy_cache_valid 404 1m;
if ($request_uri ~* \.(ico|css|jsgif|jpe?g|png)$) {
expires 72h;
break;
}
proxy_read_timeout 1200;
proxy_connect_timeout 1200;
}
rewrite ^/$ http://$host/ec last;
rewrite ^/mobile/$/ http://$host/mobile/$1 last;
rewrite ^/probe/$/ http://$host/probe/$1 last;
rewrite ^/888$ http://$host/ec/888/$1 last;
}
server {
listen 80;
server_name club.brands.com.tw;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://club.brands.com.tw:8080;
#proxy_cache my-cache;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
#proxy_cache_valid 200 302 60m;
#proxy_cache_valid 404 1m;
if ($request_uri ~* \.(ico|css|jsgif|jpe?g|png)$) {
expires 72h;
break;
}
proxy_read_timeout 1200;
proxy_connect_timeout 1200;
}
rewrite ^/$ http://club.brands.com.tw/ec last;
rewrite ^/mobile/$/ http://club.brands.com.tw/mobile/$1 last;
rewrite ^/probe/$/ http://club.brands.com.tw/probe/$1 last;
rewrite ^/888$ http://club.brands.com.tw/ec/888/$1 last;
}
server {
listen 80;
server_name mall.brands.com.tw;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://mall.brands.com.tw:8080;
#proxy_cache my-cache;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
#proxy_cache_valid 200 302 60m;
#proxy_cache_valid 404 1m;
if ($request_uri ~* \.(ico|css|jsgif|jpe?g|png)$) {
expires 72h;
break;
}
proxy_read_timeout 1200;
proxy_connect_timeout 1200;
}
rewrite ^/$ http://mall.brands.com.tw/ec last;
rewrite ^/mobile/$/ http://mall.brands.com.tw/mobile/$1 last;
rewrite ^/probe/$/ http://mall.brands.com.tw/probe/$1 last;
rewrite ^/888$ http://mall.brands.com.tw/ec/888/$1 last;
}
}
沒有留言:
張貼留言