修改 /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;
}
}
最后編輯于 :
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者