networking - Apache2 反向代理的问题
问题描述
我需要在 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 管理面板出现!
我不知道如何解决这个问题,我可能认为错误在行
解决方案
我终于设法解决了这个问题,只是在反向代理虚拟主机中,而不是<VirtualHost 100.100.100.100:80>
我需要把
<VirtualHost *:80>
推荐阅读
- datepicker - Granite ui基础服务器端(AEM)中相互依赖的日期选择器(开始,结束)
- spring-cloud-function - 请求没有正文时Spring Cloud Function输入类型丢失
- ios - iOS 12 VPN on demand 在 Readdle Documents 中不起作用
- c# - Unity 2D Raycast 反射无法正常工作
- javascript - JavaScript 应用条件和函数
- ckan - 如何在 RedHat 上从源代码安装 CKAN?
- c++ - 在 C++ 中并行化 for 循环的最小代码方法
- python - 更改 mayavi 动画中的点数
- sql - 寻找一种更高效的方式来检索 SQL 中组的前两行
- amazon-web-services - AWS Medical Comprehend 自定义