现有的应用场景:公有云服务,请求私有云服务,需要通过P5服务代理到私有云,
image.png
我们需要在公有云服务,构建https请求,并通过外联机,代理到P5前置机。这里需要代理https服务到P5前置机上。
1、haproxy代理
2、nginx代理:stream
worker_processes 1;
events {
worker_connections 2048;
}
stream {
log_format access_log_format '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
upstream p5_pl3 {
server 128.123.179.134:88889 weight=10;
}
server {
listen 8889;
proxy_pass p5_pl3;
proxy_connect_timeout 10s;
access_log /home/ap/web/nginx/logs/access.log access_log_format;
error_log /home/ap/web/nginx/logs/error.log;
}
}
网友评论