我正在用Ubuntu 12.05.5 LTS和Apache 2.2.22运行一个小型Web服务器,最近遇到这个问题:
对于虚拟机上的IIS服务器,我有以下反向代理configuration:
<VirtualHost *:443> SSLEngine on DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.1 allow from 192.168. allow from 10.8.0 </Directory> ... ProxyRequests Off ProxyPreserveHost On ProxyVia On SSLProxyEngine on <Location /AutodeskDM> Order Deny,Allow Deny from all Allow from 192.168. ProxyPass https://10.8.0.131/AutodeskDM ProxyPassReverse https://10.8.0.131/AutodeskDM </Location> <Location /autodeskdm> Order Deny,Allow Deny from all Allow from 192.168. ProxyPass https://10.8.0.131/autodeskdm ProxyPassReverse https://10.8.0.131/autodeskdm </Location> .... </VirtualHost>
这工作得很好,只允许从192.168连接。 子网,如预期。
现在,当我在ProxyPass指令中使用相同的config-SSLProxyEngine和http而不是https时,出现以下错误:
[error] [client 127.0.0.1] client denied by server configuration: proxy:http://10.8.0.131/AutodeskDM/
如果我添加
Allow from 127.0.
它当然是有效的,但是从任何地方都可以访问。
正如其他地方(如Apache反向代理访问控制 )所build议的那样,使用Proxy伪指令也没有任何效果。
<Proxy *> Order deny,allow Deny from all Allow from 192.168. </Proxy>
仍然允许从任何地方访问。
我在这里错过了什么? 这是预期的行为? 如果是这样,为什么与SSL和不SSL?
一如既往,另一个计划正在阻碍。 我有OpenVPN监听端口80和HTTP端口8080代理HTTP请求。所以,自然,HTTP请求看起来像他们从本地主机到Apache。