【发布时间】: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 的最后一部分,我在附近找不到答案。 这可能吗?我可以隐藏浏览器/收音机的完整代理地址吗?
【问题讨论】:
-
谁能帮我解决这个问题?我被卡住了!