2013-04-08 106 views
0

我在Windows机器上使用squid代理(Win2K8服务器,64位)。我参考了this链接来启用NCSA认证。安装顺利,我可以启动服务,但仍然无法获取用户名和密码提示。使用NCSA时鱿鱼不要求用户名和密码

下面是我的鱿鱼配置。请注意,我从原始的squid配置文件中删除了所有注释行,以减小帖子的大小(由于Stack的字符限制)。

# WELCOME TO SQUID 2.7.STABLE8 
# ---------------------------- 
# 

    auth_param basic program c:/squid/libexec/ncsa_auth.exe c:/squid/etc/passwd 
    auth_param basic children 5 
    auth_param basic realm Squid proxy-caching web server 
    auth_param basic credentialsttl 2 hours 
    auth_param basic casesensitive off 
# 
#Recommended minimum configuration: 
acl all src all 
acl manager proto cache_object 
acl localhost src 127.0.0.1/32 
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 
# 
# Example rule allowing access from your local networks. 
# Adapt to list your (internal) IP networks from where browsing 
# should be allowed 
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network 
#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network 
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network 
# 
acl SSL_ports port 443 
acl Safe_ports port 80  # http 
acl Safe_ports port 21  # ftp 
acl Safe_ports port 443  # https 
acl Safe_ports port 70  # gopher 
acl Safe_ports port 210  # wais 
acl Safe_ports port 1025-65535 # unregistered ports 
acl Safe_ports port 280  # http-mgmt 
acl Safe_ports port 488  # gss-http 
acl Safe_ports port 591  # filemaker 
acl Safe_ports port 777  # multiling http 
acl CONNECT method CONNECT 
acl ncsa_users proxy_auth REQUIRED 
http_access allow ncsa_users 

http_access allow manager localhost 
http_access deny manager 
http_access deny !Safe_ports 
http_access deny CONNECT !SSL_ports 
http_access allow localnet 

http_access deny all 

icp_access allow localnet 
icp_access deny all 
# Squid normally listens to port 3128 
http_port 3128 

hierarchy_stoplist cgi-bin ? 


#Default: 
cache_mem 8 MB 

access_log c:/squid/var/logs/access.log squid 

# none 

#Suggested default: 
refresh_pattern ^ftp:  1440 20% 10080 
refresh_pattern ^gopher: 1440 0% 1440 
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 
refresh_pattern .  0 20% 4320 


coredump_dir c:/squid/var/cache 

我已生成使用this 请帮passwd文件。我试图让自上周:(

回答

0

这项工作看你的规则:

http_access allow ncsa_users 
http_access allow manager localhost 
http_access deny manager 
http_access deny !Safe_ports 
http_access deny CONNECT !SSL_ports 
http_access allow localnet 

http_access deny all 

我看你允许两个ncsa_users,并在localnet 如果从内部访问该10.0网络(在描述中没有看到),你允许所有的流量没有任何auth从它与这条规则: acl localnet src 10.0.0.0/8 # RFC1918 possible internal network 因此,请尝试评论一出来,看看它是否有效