tt.aa.com 切换成 tt.aa.cn
upstream tt {
server 127.0.0.1:9011 weight=2 max_fails=3 fail_timeout=30s;
}
server {
listen 80;
server_name tt.aa.com;
rewrite "^/(.*)$" http://tt.aa.cn/$1 last;
location / {
proxy_pass http://tt;
proxy_redirect off;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/(WEB-INF)/ {
deny all;
}
}
server {
listen 80;
server_name tt.aa.cn;
location / {
proxy_pass http://tt;
proxy_redirect off;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/(WEB-INF)/ {
deny all;
}
}