安装命令
sudo yum install epel-release -y
sudo yum install nginx nginx-mod-stream -y
systemctl status nginx
systemctl start nginx
修改配置文件
vim “/etc/nginx/nginx.conf” 在http模块下添加
TCP方向代理
stream {
upstream harbor-80 {
server 172.16.16.26:80;
}
server {
listen 80;
proxy_pass harbor-80;
tcp_nodelay on;
}
upstream harbor-443 {
server 172.16.16.26:443;
}
server {
listen 443;
proxy_pass harbor-80;
tcp_nodelay on;
}
}
原创文章,作者:Carrie001128,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/245188.html