【发布时间】:2022-01-24 10:36:53
【问题描述】:
所以我正在托管一个 icecast 服务器,我想使用 apache2 将 ssl 终止代理到 icecast。 我使用 nginx 代理进行 icecast,这是完美的,但 nginx 和 php 有一些复杂性,所以我必须使用 apache2。
所以我试图实现与我在 nginx 中实现的代理相同的代理,但我根本无法阻止根路径而不阻止所有内容,或者它根本不起作用。
下面是我的虚拟主机,我添加了一些 cmets 进行一些尝试(大约 100 次尝试中的 2 次,哈哈)
<VirtualHost *:8050>
ServerAlias *.mydomain.com
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/mydomain.com.pem
ProxyPreserveHost On
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/stats.xsl [NC]
RewriteCond %{REQUEST_URI} ^/index.html [NC]
# this doesnt work. I expect because of the Rewrite Rule below?
#RewriteCond %{REQUEST_URI} ^/ [NC]
RewriteRule .* - [F,L]
# this doesnt work it blocks everything
#<Location />
# Order Allow,Deny
# Deny from all
#</Location>
ErrorLog ${APACHE_LOG_DIR}/mediaserverproxy-error.log
CustomLog ${APACHE_LOG_DIR}/mediaserverproxy-access.log combined
ProxyPass / http://localhost:80/
ProxyPassReverse / http://localhost:80/
</VirtualHost>
需要明确的是,我知道您可以在 icecast 中执行 ssl,但它会在发送 icecast HUP 信号以进行重新加载时降低稳定性。
非常感谢任何帮助
【问题讨论】:
标签: proxy apache2 block root icecast