6
nginx 反代 upstream 不支持域名只能支持 ip?
source link: https://www.v2ex.com/t/883466
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
upstream backend {
server 127.0.0.1;
keepalive 8;
}
server {
listen 80;
location / {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
如果把 www.abc.com 在 hosts 文件中解析为 127.0.0.1 ,然后
upstream backend {
server www.abc.com;
keepalive 8;
}
nginx 反代就失败了,nginx 这么低级?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK