들어오는 요청마다 사용자 정의 인증 도우미를 사용하여 역방향 프록시로 Squid를 구성해야합니다. 오징어에 대한 모든 요청은 기본 인증으로 간주됩니다. 인증에 실패한 모든 연결은 종료되어야합니다. 나는 오징어에서 초보자입니다. 다음은 내가 사용한 설정 스크립트이다. 이 샘플은, "mindofaprogrammer.blog.com"에 접근을 나는 PHP 스크립트에서 사용자 정의 인증 도우미를 작성했습니다액셀러레이터 모드 (역방향 프록시)에서 사용자 정의 인증 도우미로 squid 구성
acl all src all
acl manager proto cache_object
http_port 80 accel defaultsite=mindofaprogrammer.blog.com
cache_peer mindofaprogrammer.blog.com parent 80 0 no-query originserver name=myAccel
acl myblog dstdomain mindofaprogrammer.blog.com
http_access allow myblog
cache_peer_access myAccel allow myblog
cache_peer_access myAccel deny all
auth_param basic program C:/wamp/bin/php/php5.3.0/php.exe "c:/squid/libexec/authhelper.php"
auth_param basic children 2
auth_param basic realm eReader
auth_param basic credentialsttl 5 hours
acl AuthUsers proxy_auth REQUIRED
http_access allow AuthUsers
access_log c:/squid/var/logs/access.log squid
coredump_dir c:/squid/var/cache
입니다. 다음과 같은 목록이
<?php
$f = fopen("php://stdin", "r");
while ($line = fgets($f)) {
$line = trim($line);
$fields = explode(' ', $line);
$username = rawurldecode($fields[0]); //1738
$password = rawurldecode($fields[1]); //1738
if ($username == 'hello'
and $password == 'world') {
fwrite(STDOUT, "OK\n");
} else if ($username == 'fo'
and $password == 'bar') {
fwrite(STDOUT, "OK\n");
} else {
// failed miserably
fwrite(STDOUT, "ERR\n");
}
}
?>
심지어이를 구성한 후, IS 직면하고 문제 만 리버스 프록시 설정이 인증되지 노력하고있다. 내가 여기서 뭔가 잘못하고있는거야?
주제가 아닙니다. 수퍼 유저/관리자 질문입니다. – leppie