模板3.nginx代理格式

1、配置文件模板
[root@local-kvm ~]# grep -vE '^(#|$)' /etc/nginx/nginx.conf |grep -i include
    include     /usr/share/nginx/modules/*.conf;
    include     /etc/nginx/mime.types;
    include     /etc/nginx/conf.d/*.conf;
    include     /etc/nginx/default.d/*.conf;

  • conf.d/vm62.conf
[root@local-kvm conf.d]# cat /etc/nginx/conf.d/vm.conf
#include /etc/nginx/conf.d/80.cnf;    
server {
   
   
        listen       80;
        server_name  192.168.100.62;

	include /etc/nginx/conf.d/80.cnf;    
    }
  • conf.d/80.cnf
location /zabbix/ {
   
   
    proxy_pass http://192.168.100.62:8080/;
}
	
# nacos集群版
location /nacos/ {
   
   
    proxy_pass http://192.168.100.63/nacos/;
}

# nacos单节点版
location /nacos2/ {
   
   
    proxy_pass http://192.168.100.62:8848/nacos/;
}

2、代理harbor
  • server端配置
[root@local-kvm conf.d]# cat server.conf 

server {
   
   
    listen       180;
    client_max_body_size 1000m; #避免上传失败
    include /etc/nginx/conf.d/180.cnf;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值