【发布时间】:2021-03-11 01:21:57
【问题描述】:
我需要在 apache2 中为 icecast 服务器创建一个反向代理,但使用另一个虚拟主机作为一个简单的网站
我设法在 apache Virtualhost 中使用此配置创建了反向代理
<VirtualHost 100.100.100.100:80>
ServerName icecast.xxx.com
ProxyPass / http://localhost:8000/
</VirtualHost>
100.100.100.100是服务器的ip,xxx.com是域
因此,当我在浏览器中输入 icecast.xxx.com 时,icecast 管理面板(在 8000 端口上)会出现
然后我添加了另一个虚拟主机
<VirtualHost *:80>
ServerName xxx.com
ServerAlias www.xxx.com
ServerAdmin MY_EMAIL
DocumentRoot /var/www/site/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我已经用sudo a2ensite NAME_OF_THE_CONFIG_FILE启用了他
但是当我访问 VPS 的 ip 或 xxx.com/www.xxx.com 时,icecast2 管理面板会出现!
我不知道如何解决这个问题,我可能认为错误在行
【问题讨论】:
标签: networking apache2 reverse-proxy virtualhost