2013-04-08 71 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 因此,請嘗試評論一出來,看看它是否有效