【问题标题】:nginx - Hide proxy host + port + pathnginx - 隐藏代理主机+端口+路径
【发布时间】:2017-01-17 19:01:33
【问题描述】:

使用 nginx 1.4.6 运行 Ubuntu 14.04 LTS

我有一个互联网广播电台,人们可以直接从 winterradio.com 收听/流式传输(示例),并在 nginx 中为我的虚拟主机 winterradio.com 获得了下一个配置:

server {
server_tokens off;
listen 80;
server_name winterradio.com;
location / {
proxy_pass http://radiohost.com:1972/radio
 }
}

我的问题是:如何向连接的人隐藏 proxy_pass url+port+folder(mountpoint) 以便他们只能看到 http://winterradio.com 而不是 http://radiohost.com:1972/radio ? 我添加了接下来的 2 行:

server_name_in_redirect off;
proxy_set_header Host $host:$server_port

这几乎成功了,但并没有隐藏代理地址 /radio 的最后一部分,我在附近找不到答案。 这可能吗?我可以隐藏浏览器/收音机的完整代理地址吗?

【问题讨论】:

  • 谁能帮我解决这个问题?我被卡住了!

标签: ubuntu nginx mod-proxy


【解决方案1】:

通过在 icecast2 和 nginx 中编译和启用的 ssl 解决了这个问题。

【讨论】:

猜你喜欢
  • 2021-02-14
  • 2021-01-22
  • 1970-01-01
  • 1970-01-01
  • 2021-12-13
  • 1970-01-01
  • 2020-07-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多