Nacos 1.2.1 集群搭建(三) Nginx 配置 集群


配置 Nginx 

 

 

 

 

 可以把.conf 文件拉到本地,配置好再傳上去

 #gzip  on;

    upstream cluster{
        server 192.168.0.113:8848;
        server 192.168.0.110:8848;
        server 192.168.0.109:8848;
    }
    
    
    server {
        listen       8848;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            #root   html;
            #index  index.html index.htm;
            proxy_pass http://cluster;
        }

改動如下

 

 

[root@localhost sbin]# pwd
/usr/local/nginx/sbin
[root@localhost sbin]# ./nginx -c /usr/local/nginx/conf/nginx.conf

 

 

 

 網頁可以正常訪問,再添加一個配置信息,驗證一下,能否成功保存到數據庫

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM