Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that some websites cannot be accessed after using squid agent

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to solve the problem that some websites cannot be accessed after using the squid agent". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to solve the problem that some websites cannot be accessed after using the squid agent".

In the test of the Squid proxy server, it is found that some websites are inaccessible, but most of them are accessible. (current environment: squid-2.6.STABLE21-6 version) this problem appears on my blog. If you visit http://www.liusuping.com, you can't access it using the squid proxy. If the agent removes all ok, the same thing happens on http://www.brocader.cn, where both sites are on the same server.

According to the above situation, we can judge that the website server has been set up and proxy server access is prohibited. I will not say anything about the space of the sharing network. I will go abroad if I have the opportunity in the future.

Looking for some information on the Internet, this is still a common problem, and the solution is to set up the header of the proxy server.

By default, the squid proxy server will tell the other website that I am a proxy server, and some servers will deny service when they see that the proxy server is coming to access.

Therefore, the following changes should be made on the configuration file of squid:

Vim / etc/squid/squid.conf

Add the following two lines

Header_access Via deny all

Header_access X-Forwarded-For deny all

By default, both options are allow. Restart the squid service after modification and access is normal.

When you install version 3.1.7 of squid, you will find that the original configuration is not available because the configuration file of squid has changed since version 3.0.

There is still http://www.liusuping.com/ this website can not visit, welcome to use my website to test.

After looking up a lot of information on the Internet, we still can't find a solution above version 3.0, so we have to look at the documentation that comes with squid, but the principle is still the same. Some servers refuse to access the proxy server, so we still have to solve the problem through the information of the proxy server.

First introduce a website to check the ip address, http://ipid.shat.net/, where you can also see the information of the proxy server you use, as shown in the following figure:

What we need is hiding: "HTTP Forwarded For" and "Proxy Host/Type".

By looking at the squid documentation, find the following two parameters, add them to the squid configuration document, and restart the squid service

Forwarded_for off

Via off

Problem solved, then go to http://ipid.shat.net/ to check your information, and then visit http://www.liusuping.com/ to see if you can access it normally.

Thank you for your reading, the above is the content of "how to solve the problem that some websites cannot be accessed after using the squid agent". After the study of this article, I believe you have a deeper understanding of how to solve the problem that some websites cannot be accessed after using the squid agent. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report