In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
I. the use of ACL in Squid
(1) ACL access control method:
(2) ACL rule priority:
(3) commonly used ACL list types:
(4) Operation demonstration:
Second, log analysis
Step 1: install the sarg tool
Step 2: install Apache
Step 3: test on the client
III. Reverse agency
Modify / etc/squid.conf file
Add the following code:
1. Based on IP address restrictions:
2. Based on time limit:
3. Based on the destination address (that is, web server address)
You can add a rejected destination address to a file
Second, log analysis
Install sarg tools
Sarg (Squid Analysis Report Generator), is a Squid log analysis tool, using HTML format, a detailed list of each user to visit Internet site information, time occupation information, ranking, connection times, visits and so on.
Yum install-y gd gd-devel pcremkdir / usr/local/sargtar zxvf sarg-2.3.7.tar.gz-C / opt/./configure-- prefix=/usr/local/sarg\-- sysconfdir=/etc/sarg\-- enable-extraprotection / / additional security protection make & & make install
Modify the main configuration file / etc/sarg/sarg.conf
Vim / etc/sarg/sarg.conf enables the following functions (with minor modifications): access_log / usr/local/squid/var/logs/access.log / / specify access log file title "Squid User Access Reports" / / web page title output_dir / var/www/html/squid-reports / / report output directory user_ip no / / use the user name to display the number of connections in the exclude_hosts / usr/local/sarg/noreport / / site list file topuser_sort_field connect reverse / / top that does not count for sorting, Access bytes, user_sort_field reverse / / user access records in descending order, number of connections, Access bytes sorted in descending order overwrite_report no / / whether the log of the same name overrides mail_utility mail.postfix / / send mail report command charset UTF-8 / / use character set weekdays 0-6 / / week cycle www ranked by top _ document_root / varwww/html / / Web page root directory
Adding will not be counted in the site file, and the added domain name will not be displayed in the sort.
Touch / usr/local/sarg/noreportln-s / usr/local/sarg/bin/sarg / usr/local/bin/// is easy to manage and can create a soft connection
Enable:
Step 2: install Apache
Yum install httpd-y
Visit on the browser: http://192.168.220.131/squid-reports
Through this tool, we can see the details of the visit.
At the same time, you can also use periodically scheduled tasks to perform daily reports:
Sarg-1 / usr/local/squid/var/logs/access.log-o / var/www/html/squid-reports/-z-d $(date-d "1 day ago" +% d/%m/%Y)-$(date +% d/%m/%Y) III. Reverse proxy
How reverse proxy works:
The reverse proxy server is located between the local WEB server and the Internet.
When a user browser issues a HTTP request, the request is directed to the reverse proxy server through domain name resolution (if you want to implement a reverse proxy for multiple WEB servers, you need to point the domain names of multiple WEB servers to the reverse proxy server). Requested by the reverse proxy server processor. Reverse proxies generally cache only bufferable data (such as html pages and images), while some CGI scripts or programs such as ASP do not. It buffers static pages based on the HTTP header tags returned from the WEB server.
Modify the proxy server port:
Browsers access http://www.yun.com/
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.