docker nginx nacos反向代理集群配置
作者:
Butif_D | 来源:发表于
2022-02-22 10:34 被阅读0次修改 /conf.d/default.conf [ 先备份 ]
upstream nacosserver {
server 192.168.137.133:8848;
server 192.168.137.133:8850;
server 192.168.137.133:8852;
}
upstream sentinelserver {
server 192.168.137.133:8858;
}
server {
listen 80;
listen [::]:80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
# 注释掉原配置
# root /usr/share/nginx/html;
# 注释掉原配置
# index index.html index.htm;
# 修改 ↑
proxy_pass http://nacosserver/nacos/;
}
location /sentinel/ {
rewrite ^/sentinel/(.*)$ /$1 break;
proxy_pass http://192.168.137.133:8858;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
本文标题:docker nginx nacos反向代理集群配置
本文链接:https://www.haomeiwen.com/subject/seyilrtx.html
网友评论