
저는 Ubuntu 12.05.5 LTS 및 Apache 2.2.22를 사용하여 소규모 웹 서버를 실행하고 있는데 최근에 이 문제가 발생했습니다.
가상 머신의 IIS 서버의 경우 다음과 같은 역방향 프록시 구성이 있습니다.
<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.1의 연결만 허용합니다. 예상대로 서브넷입니다.
이제 ProxyPass 지시문에서 https 대신 SSLProxyEngine on 및 http를 제외한 동일한 구성을 사용하면 다음 오류가 발생합니다.
[error] [client 127.0.0.1] client denied by server configuration: proxy:http://10.8.0.131/AutodeskDM/
내가 추가하면
Allow from 127.0.
물론 작동하지만 어디에서나 액세스가 허용됩니다.
다른 곳에서 제안한 대로 Proxy 지시문을 사용하여 재생합니다(예:Apache 역방향 프록시 액세스 제어) 역시 효과가 없습니다.
<Proxy *>
Order deny,allow
Deny from all
Allow from 192.168.
</Proxy>
여전히 어디서나 액세스가 가능합니다.
내가 여기서 무엇을 놓치고 있는 걸까요? 이것이 예상되는 동작입니까? 그렇다면 SSL 유무에 따라 왜 다른가요?
답변1
늘 그렇듯이 다른 프로그램이 방해가 되고 있었습니다. OpenVPN이 포트 80에서 수신 대기하고 포트 8080에서 Apache에 대한 http 요청을 프록시 처리합니다. 따라서 당연히 http 요청은 localhost에서 Apache로 오는 것처럼 보입니다.