天天看點

nginx代理frps後出現 http proxy request error: no such domain

nginx反向代理少了這個:

proxy_set_header Host $host;
           

fprs的伺服器上的nginx 配置改為

server {
  listen 80;
  server_name _;
  index index.htm index.html;

  location / {
    proxy_pass http://frps;
    proxy_set_header Host $host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    error_log  /var/log/nginx/frps.error.log;
    access_log  /var/log/nginx/frps.access.log;
  }
}
           

繼續閱讀