server {
listen 80;
server_name sbox-promote.xxxx.com sbox-isp.xxxx.com sbox-dsp.xxxx.com sbox-ssp.xxxx.com sbox-a.xxxx.com openapi.xxxx.com;
index index.html index.htm;
# 前段地址nginx配置 begin
location ^~ /isp-static/ {
charset utf-8;
# access_log off;
}
location ^~ /js/ {
charset utf-8;
# access_log off;
}
## 前段地址nginx配置 End
## tomcat服务配置 Begin
location ^~ /isp-kongming/ {
#access_by_lua_file "/usr/local/openresty/lualib/waf.lua";
proxy_read_timeout 3600;
proxy_connect_timeout 3000;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_pass http://isp.kongming;
proxy_redirect off;
access_log on;
}
## isp End
## 图片服务配置 Begin
location ^~ /img/ {
proxy_pass http://sbox-ssp.xxxx.com/img/;
}
## OSS Begin
location ^~ /oss-manager/ {
proxy_read_timeout 3600;
proxy_connect_timeout 3000;
proxy_redirect off;
proxy_http_version 1.1;
client_max_body_size 1024m;
proxy_set_header Host $http_host;
proxy_pass http://oss.manager;
access_log on;
}
## OSS End
## SSP服务 Begin
location ^~ /perm-manager/ {
#access_by_lua_file "/usr/local/openresty/lualib/waf.lua";
proxy_read_timeout 3600;
proxy_connect_timeout 3000;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_pass http://perm.manager;
proxy_redirect off;
access_log on;
}
##配置不同组域名对应路径
location / {
access_log on;
content_by_lua '
if ngx.var.host == "sbox-dsp.xxxx.com" then
ngx.redirect("/dsp-static/")
elseif ngx.var.host == "sbox-isp.xxxx.com" then
ngx.redirect("/isp-static/")
elseif ngx.var.host == "sbox-ssp.xxxx.com" then
ngx.redirect("/ssp-static/")
elseif ngx.var.host == "sbox-promote.xxxx.com" then
ngx.redirect("/promote_dist/")
end
';
}
access_log /data/wwwlogs/access_psc.xxxx.com.log access;
}
upstream isp.kongming {
server 192.168.87.77:8081;
}
upstream a_xxxx_com {
server 192.168.87.79:8880;
}
upstream isp.process {
server 192.168.87.77:8082;
}
listen 80;
server_name sbox-promote.xxxx.com sbox-isp.xxxx.com sbox-dsp.xxxx.com sbox-ssp.xxxx.com sbox-a.xxxx.com openapi.xxxx.com;
index index.html index.htm;
# 前段地址nginx配置 begin
location ^~ /isp-static/ {
charset utf-8;
# access_log off;
}
location ^~ /js/ {
charset utf-8;
# access_log off;
}
## 前段地址nginx配置 End
## tomcat服务配置 Begin
location ^~ /isp-kongming/ {
#access_by_lua_file "/usr/local/openresty/lualib/waf.lua";
proxy_read_timeout 3600;
proxy_connect_timeout 3000;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_pass http://isp.kongming;
proxy_redirect off;
access_log on;
}
## isp End
## 图片服务配置 Begin
location ^~ /img/ {
proxy_pass http://sbox-ssp.xxxx.com/img/;
}
## OSS Begin
location ^~ /oss-manager/ {
proxy_read_timeout 3600;
proxy_connect_timeout 3000;
proxy_redirect off;
proxy_http_version 1.1;
client_max_body_size 1024m;
proxy_set_header Host $http_host;
proxy_pass http://oss.manager;
access_log on;
}
## OSS End
## SSP服务 Begin
location ^~ /perm-manager/ {
#access_by_lua_file "/usr/local/openresty/lualib/waf.lua";
proxy_read_timeout 3600;
proxy_connect_timeout 3000;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_pass http://perm.manager;
proxy_redirect off;
access_log on;
}
##配置不同组域名对应路径
location / {
access_log on;
content_by_lua '
if ngx.var.host == "sbox-dsp.xxxx.com" then
ngx.redirect("/dsp-static/")
elseif ngx.var.host == "sbox-isp.xxxx.com" then
ngx.redirect("/isp-static/")
elseif ngx.var.host == "sbox-ssp.xxxx.com" then
ngx.redirect("/ssp-static/")
elseif ngx.var.host == "sbox-promote.xxxx.com" then
ngx.redirect("/promote_dist/")
end
';
}
access_log /data/wwwlogs/access_psc.xxxx.com.log access;
}
upstream isp.kongming {
server 192.168.87.77:8081;
}
upstream a_xxxx_com {
server 192.168.87.79:8880;
}
upstream isp.process {
server 192.168.87.77:8082;
}