在Ubuntu上,下面的配置是有效的:

server {
      listen 80;
      server_name news.example.com;
      location / {
          proxy_pass http://192.168.1.123;
          proxy_set_header Host $host;
      }
 }

如果使用 $sheme://$host 代替 http://ip 则报 502 错误。

相关文章:

  • 2022-01-07
  • 2021-07-25
  • 2022-12-23
  • 2021-12-19
  • 2021-09-02
  • 2021-06-02
  • 2021-07-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-12
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
相关资源
相似解决方案