pig
Posted sheng-247
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pig相关的知识,希望对你有一定的参考价值。
user wls81 wls;
worker_processes 5;
error_log logs/error.log;
pid logs/nginx.pid;
events {
use epoll;
worker_connections 200000;
accept_mutex off;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off;
sendfile on;
keepalive_timeout 65;
client_max_body_size 10m;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
gzip_disable "MSIE [1-6].";
log_format access ‘$remote_addr - $remote_user [$time_local] "$request"‘ ‘$status $body_bytes_sent "$http_referer"‘ ‘"$http_user_agent" $http_x_forwarded_for $upstream_connect_time $upstream_header_time $request_time $upstream_response_time‘;
limit_req_zone $server_name zone=perserver:1m rate=1250r/s;
limit_conn_zone $server_name zone=conserver:1m;
upstream codemanager {
server 215.158.45.179:8001 max_fails=3 fail_timeout=60s;
server 215.158.45.149:8001 max_fails=3 fail_timeout=60s;
}
upstream supercode {
server 215.158.45.184:7071 max_fails=3 fail_timeout=60s;
server 215.158.45.145:7071 max_fails=3 fail_timeout=60s;
}
upstream third {
server 215.158.45.183:9091 max_fails=3 fail_timeout=60s;
server 215.158.45.91:9091 max_fails=3 fail_timeout=60s;
}
upstream pig {
server 215.158.45.182:7788 max_fails=3 fail_timeout=60s;
server 215.158.45.87:7788 max_fails=3 fail_timeout=60s;
}
server {
listen 0.0.0.0:33471;
server_name ng_paic-iag-insurance-prd;
access_log logs/host.access.log access;
# include /wls/apache/appsystems/ng_paic-iag-insurance-prd/config/custom.conf;
rewrite ^/f5monweb(.*) /monitor_ng/$1;
location / {
root /wls/apache/appsystems/ng_paic-iag-insurance-prd/;
index index.html index.htm;
}
location /monitor_ng {
root /wls/apache;
index f5check.htm f5check.jsp;
}
location /status {
check_status;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
}
server {
listen 33471;
server_name platform.iag.pingan.com;
root /wls/apache/appsystems/ng_paic-iag-insurance-prd/apps/dist/platform;
location ~* /pig/code/abc {
proxy_pass http://supercode;
}
location ~* /apiInterface/pig {
rewrite /apiInterface/pig/(.*)$ /pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://supercode;
}
location ~* /apiInterface/hydra-shandong-pingan-pig {
rewrite /apiInterface/hydra-shandong-pingan-pig/(.*)$ /hydra-shandong-pingan-pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://pig;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
}
server {
listen 33471;
server_name system.iag.pingan.com config.iag.pingan.com;
root /wls/apache/appsystems/ng_paic-iag-insurance-prd/apps/dist/system;
location ~* /pig/code/abc {
proxy_pass http://supercode;
}
location ~* /apiInterface/pig {
rewrite /apiInterface/pig/(.*)$ /pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://supercode;
}
location ~* /apiInterface/hydra-shandong-pingan-pig {
rewrite /apiInterface/hydra-shandong-pingan-pig/(.*)$ /hydra-shandong-pingan-pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://pig;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
}
server {
listen 33471;
server_name login.iag.pingan.com ;
root /wls/apache/appsystems/ng_paic-iag-insurance-prd/apps/dist/userCenter;
location ~* /pig/code/abc {
proxy_pass http://supercode;
}
location ~* /apiInterface/pig {
rewrite /apiInterface/pig/(.*)$ /pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://supercode;
}
location ~* /apiInterface/hydra-shandong-pingan-pig {
rewrite /apiInterface/hydra-shandong-pingan-pig/(.*)$ /hydra-shandong-pingan-pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://pig;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
}
server {
listen 33471;
server_name org.iag.pingan.com;
root /wls/apache/appsystems/ng_paic-iag-insurance-prd/apps/dist/org;
location ~* /pig/code/abc {
proxy_pass http://supercode;
}
location ~* /apiInterface/pig {
rewrite /apiInterface/pig/(.*)$ /pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://supercode;
}
location ~* /apiInterface/hydra-shandong-pingan-pig {
rewrite /apiInterface/hydra-shandong-pingan-pig/(.*)$ /hydra-shandong-pingan-pig/$1 break;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://pig;
}
# location ~* /apiInterface {
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header REMOTE-HOST $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_pass http://pa-pig-system.iag-stg.pingan.com;
# }
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
}
server {
listen 33471;
server_name pdainterface.iag.pingan.com;
#root /data/www/ShengDongPig/userCenter;
location /hydra-shandong-pingan-pig-mobile/ {
proxy_pass http://pig;
}
location /pig/ {
proxy_pass http://supercode;
}
location / {
proxy_pass http://pig;
}
location /apollo/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://215.158.45.144:8070/signin;
}
location /apollo/vendor/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://215.158.45.144:8070/vendor;
}
location /abc/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://215.158.45.165:8762/;
}
location /eureka/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://215.158.45.165:8762;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
}
}
以上是关于pig的主要内容,如果未能解决你的问题,请参考以下文章