squid-proxy

Hao_0806 发布于 2011/08/16 16:33
阅读 1K+
收藏 1
我安装了一个squid作proxy但是现在遇到一个问题就是,我在使用proxy的时候只能用IP反问,输入域名就无法解析。难道我做服务器的IP也要有个域名!
加载中
1
H
Hao_0806

您所请求的网址(URL)无法获取

当尝试读取以下网址(URL)时: http://www.baidu.com/s?

发生了下列的错误:

无法将您输入的主机名称: www.baidu.com转换成 IP 地址

    域名服务器返回以下讯息:

    Refused: The name server refuses to perform the specified operation.

    这表示:

     The cache was not able to resolve the hostname presented in the URL. 
     Check if the address is correct. 
     缓存服务器无法解析您输入网址(URL)中的主机名称,
     请检查该名称是否正确。

    本缓存服务器管理员:webmaster

    Generated Wed, 17 Aug 2011 09:17:01 GMT by localhost.localdomain (squid/3.0.STABLE7)
    s
    sepyj
    你好。我想问一下,在已经设置的情况下,squid在什么情况下对哪些元素不会进行加速。 谢谢。。
    0
    我爱C#
    我爱C#
    多新鲜啊,没域名怎么访问啊
    0
    H
    Hao_0806

    但是他不能解析域名,我已经设置了DNS地址了

    0
    一号男嘉宾
    一号男嘉宾
    你把你的规则贴出来看看
    0
    ExtremeTalk
    ExtremeTalk
    DSN端口是不是被禁了啊?
    s
    sepyj
    你好。我想问一下,在已经设置的情况下,squid在什么情况下对哪些元素不会进行加速。 谢谢。。。
    0
    H
    Hao_0806

    引用来自“梅公子”的答案

    你把你的规则贴出来看看

    这个是conf的配置,我用的是squid3.0
    http_port 8080
    cache_mem 1024 M 
    cache_swap_low 75 
    cache_swap_high 95 
    maximum_object_size 4096 KB 
    cache_dir ufs /var/spool/squid 45000 16 256 
    cache_access_log /var/squid/logs/access.log 
    cache_log /dev/null 
    cache_store_log none 
    debug_options ALL,1 

    icp_access allow all 
    icp_query_time out 2000 

    cache_effective_user squid 
    cache_effective_group squid 


    acl all src 0.0.0.0/0 
     
     
    http_access allow localhost
    http_access deny all


    acl QUERY urlpath_regex  cgi-bin \?  
    no_cache deny QUERY 

    reference_age 3 days 
    quick_abort_min 16 KB 
    quick_abort_max 16 KB 
    quick_abort_pct 95 
    connect_timeout 60 seconds 
    read_timeout 3 minutes 
    request_timeout 30 seconds 
    client_lifetime 30 seconds 
    half_closed_clients off 
    pconn_timeout 60 seconds 
    ident_timeout 10 seconds 
    shutdown_lifetime 10 seconds 

    memory_pools off 
    memory_pools_limit 0
    dns_nameservers 202.101.103.54 210.34.0.14

    0
    H
    Hao_0806

    引用来自“ExtremeTalk”的答案

    DSN端口是不是被禁了啊?

    我登陆这台机器,在命令行下ping www.baidu.com是通的,我觉得应该没被禁止吧

    ExtremeTalk
    ExtremeTalk
    你要nslookup吧
    0
    H
    Hao_0806

    引用来自“Hao_0806”的答案

    引用来自“梅公子”的答案

    你把你的规则贴出来看看

    这个是conf的配置,我用的是squid3.0
    http_port 8080
    cache_mem 1024 M 
    cache_swap_low 75 
    cache_swap_high 95 
    maximum_object_size 4096 KB 
    cache_dir ufs /var/spool/squid 45000 16 256 
    cache_access_log /var/squid/logs/access.log 
    cache_log /dev/null 
    cache_store_log none 
    debug_options ALL,1 

    icp_access allow all 
    icp_query_time out 2000 

    cache_effective_user squid 
    cache_effective_group squid 


    acl all src 0.0.0.0/0 
     
     
    http_access allow localhost
    http_access deny all


    acl QUERY urlpath_regex  cgi-bin \?  
    no_cache deny QUERY 

    reference_age 3 days 
    quick_abort_min 16 KB 
    quick_abort_max 16 KB 
    quick_abort_pct 95 
    connect_timeout 60 seconds 
    read_timeout 3 minutes 
    request_timeout 30 seconds 
    client_lifetime 30 seconds 
    half_closed_clients off 
    pconn_timeout 60 seconds 
    ident_timeout 10 seconds 
    shutdown_lifetime 10 seconds 

    memory_pools off 
    memory_pools_limit 0
    dns_nameservers 202.101.103.54 210.34.0.14

    这个是logs的信息

    2011/08/17 17:14:50| Starting Squid Cache version 3.0.STABLE7 for i686-pc-linux-gnu...
    2011/08/17 17:14:50| Process ID 21330
    2011/08/17 17:14:50| With 1024 file descriptors available
    2011/08/17 17:14:50| DNS Socket created at 0.0.0.0, port 57217, FD 8
    2011/08/17 17:14:50| Adding nameserver 202.101.103.54 from squid.conf
    2011/08/17 17:14:50| Adding nameserver 210.34.0.14 from squid.conf
    2011/08/17 17:14:50| Unlinkd pipe opened on FD 13
    2011/08/17 17:14:50| Swap maxSize 102400 KB, estimated 7876 objects
    2011/08/17 17:14:50| Target number of buckets: 393
    2011/08/17 17:14:50| Using 8192 Store buckets
    2011/08/17 17:14:50| Max Mem  size: 8192 KB
    2011/08/17 17:14:50| Max Swap size: 102400 KB
    2011/08/17 17:14:50| Version 1 of swap file with LFS support detected...
    2011/08/17 17:14:50| Rebuilding storage in /usr/local/squid/var/cache (CLEAN)
    2011/08/17 17:14:50| Using Least Load store dir selection
    2011/08/17 17:14:50| Set Current Directory to /usr/local/squid/var/cache
    2011/08/17 17:14:50| Loaded Icons.
    2011/08/17 17:14:50| Accepting  HTTP connections at 0.0.0.0, port 8080, FD 15.
    2011/08/17 17:14:50| Accepting ICP messages at 0.0.0.0, port 3130, FD 16.
    2011/08/17 17:14:50| HTCP Disabled.
    2011/08/17 17:14:50| Ready to serve requests.
    2011/08/17 17:14:50| Done reading /usr/local/squid/var/cache swaplog (32 entries)
    2011/08/17 17:14:50| Finished rebuilding storage from disk.
    2011/08/17 17:14:50|        32 Entries scanned
    2011/08/17 17:14:50|         0 Invalid entries.
    2011/08/17 17:14:50|         0 With invalid flags.
    2011/08/17 17:14:50|        32 Objects loaded.
    2011/08/17 17:14:50|         0 Objects expired.
    2011/08/17 17:14:50|         0 Objects cancelled.
    2011/08/17 17:14:50|         0 Duplicate URLs purged.
    2011/08/17 17:14:50|         0 Swapfile clashes avoided.
    2011/08/17 17:14:50|   Took 0.11 seconds (295.09 objects/sec).
    2011/08/17 17:14:50| Beginning Validation Procedure
    2011/08/17 17:14:50|   Completed Validation Procedure
    2011/08/17 17:14:51|   Validated 89 Entries
    2011/08/17 17:14:51|   store_swap_size = 600
    2011/08/17 17:14:51| storeLateRelease: released 0 objects

    0
    一号男嘉宾
    一号男嘉宾
    你是不是没有设置DNS地址,你在你的squid上面ping一下百度看看能ping通不
    H
    Hao_0806
    能ping通!
    返回顶部
    顶部