ReverseProxy環境下における.htaccessでのアクセス制限
reverse proxy 越しの IP アクセス制御 with mod_extract_forwarded 編とSetEnvIf を使うんだけど…。 より、.htaccessを以下のように設定。
これで、講義室(3ー105B)からと、植村研からのみ講義ページが見えるようになりました。
ErrorDocument 404 /com02/404.html <Files ~ "index10.php"> order deny,allow # RemoveAcceptForwarder all # SetEnvIf PROXY_ADDR ^10\.10\.126\. ALLOWED_ROOM=1 SetEnvIf X-Forwarded-For ^10\.10\.126\. ALLOWED_ROOM=1 allow from env=ALLOWED_ROOM allow from 133.83.90.98 deny from all ErrorDocument 403 /com02/403.html </Files> <Files ~ "index(11|12|13|14|15|16|17).php|exam.html|exam2.html|exam.cgi|exam-2*.html> order deny,allow deny from all allow from 133.83.90.98 ErrorDocument 403 /com02/403.html </Files>
コメントを残す