server
{
listen 9998;
server_name 192.168.0.1:9998;
location /servlets/ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.0.1:8088;
}
location / {
root /usr/local/nginx/html/web/;
index index.html index.htm;
}
location ~ .(jsp|do)?$ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.0.1:8088;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 700s;
}
if ($http_user_agent ~* "qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot") {
return 403;
}
access_log /usr/local/nginx/logs/www.abc.com.cn_access.log;
}
server
{
listen 9994;
server_name 192.168.0.1:9994;
location / {
proxy_redirect off;
root /usr/local/nginx/html/weixin/;
index index.html index.htm;
}
location ~ .(jsp|do)?$ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8084;
}
if ($http_user_agent ~* "qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot") {
return 403;
}
access_log /usr/local/nginx/logs/m.abc.com.cn_access.log;
}
server
{
listen 9990;
server_name store.abc.com.cn *.store.abc.com.cn;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8081;
}
access_log /usr/local/nginx/logs/store.abc.com.cn_access.log;
}
server
{
listen 9992;
server_name 192.168.0.1:9992;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.0.2:8082;
}
access_log /usr/local/nginx/logs/shopcenter.abc.com.cn_access.log;
}
server
{
listen 9993;
server_name 192.168.0.1:9993;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.0.3:8083;
}
access_log /usr/local/nginx/logs/search.abc.com.cn_access.log;
}
|