{"id":450,"date":"2011-06-08T11:55:41","date_gmt":"2011-06-08T08:55:41","guid":{"rendered":"http:\/\/oss-it.su\/?p=450"},"modified":"2016-09-23T14:19:00","modified_gmt":"2016-09-23T11:19:00","slug":"450","status":"publish","type":"post","link":"https:\/\/oss-it.su\/en\/450","title":{"rendered":"Squid \u00ad An example of a simple proxy\u00adserver configuration"},"content":{"rendered":"<p><em><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-707 size-full img-responsive\" src=\"https:\/\/oss-it.su\/wp-content\/uploads\/2011\/06\/squid-shade-1.png\" alt=\"squid-shade\" width=\"360\" height=\"185\" srcset=\"https:\/\/oss-it.su\/wp-content\/uploads\/2011\/06\/squid-shade-1.png 360w, https:\/\/oss-it.su\/wp-content\/uploads\/2011\/06\/squid-shade-1-300x154.png 300w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/>Squid<\/em> is a powerful proxy\u00adserver having a flexible configuration. While there are plenty of graphical user interfaces available for his proxy\u00adserver adjustment, this article addresses its simplest configuration by using the command line of Debian\/Ubuntu operating systems, with the statistics displayed. As a result, you will have the proxy\u00adserver running and being capable of managing and granting access to a multitude of users while monitoring the proxy&#8217;s activity.<\/p>\n<p>English version of this page under construction. <a href=\"https:\/\/translate.google.com\/translate?sl=ru&#038;tl=en&#038;u=https%3A%2F%2Foss-it.su%2F450\">You can read automatic translation<\/a>.<\/p>\n<hr \/>\n<p><em>Squid<\/em> &#8211; \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0433\u0438\u0431\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u0434\u043b\u044f \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c Debian\/Ubuntu \u0441 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 proxy-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <em>squid<\/em> \u0438 <em>apache2-utils<\/em> \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<p><code>sudo apt-get install squid apache2-utils<\/code><\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<p><code>sudo htpasswd -c \/etc\/squid\/passwd username<\/code><\/p>\n<p>\u0413\u0434\u0435 &#8216;username&#8217; &#8211; \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>sudo htpasswd \/etc\/squid\/passwd username1<\/code><br \/>\n<code>sudo htpasswd \/etc\/squid\/passwd username2<\/code><\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a:<\/p>\n<p><code>sudo cp \/etc\/squid\/squid.conf \/etc\/squid\/squid_original.conf<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p><code>sudo rm \/etc\/squid\/squid.conf<br \/>\nsudo nano \/etc\/squid\/squid.conf<\/code><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><code># \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<br \/>\nauth_param basic realm Default proxy server<br \/>\nauth_param basic program \/usr\/lib\/squid\/ncsa_auth \/etc\/squid\/passwd<br \/>\nauth_param basic children 5<br \/>\nauth_param basic credentialsttl 3 hours<br \/>\nauth_param basic casesensitive off<\/code><\/p>\n<p>acl all src 0.0.0.0\/0<br \/>\nacl manager proto cache_object<br \/>\nacl localhost src 127.0.0.1\/32<br \/>\nacl to_localhost dst 127.0.0.0\/8 0.0.0.0\/32<\/p>\n<p>acl localnet src 10.0.0.0\/8<br \/>\nacl localnet src 172.16.0.0\/12<br \/>\nacl localnet src 192.168.0.0\/24<\/p>\n<p>acl SSL_ports port 443 # https<br \/>\nacl SSL_ports port 563 # snews<br \/>\nacl SSL_ports port 873 # rsync<br \/>\nacl Safe_ports port 80 # http<br \/>\nacl Safe_ports port 21 # ftp<br \/>\nacl Safe_ports port 443 # https<br \/>\nacl Safe_ports port 70 # gopher<br \/>\nacl Safe_ports port 210 # wais<br \/>\nacl Safe_ports port 1025-65535 # unregistered ports<br \/>\nacl Safe_ports port 280 # http-mgmt<br \/>\nacl Safe_ports port 488 # gss-http<br \/>\nacl Safe_ports port 591 # filemaker<br \/>\nacl Safe_ports port 777 # multiling http<br \/>\nacl Safe_ports port 631 # cups<br \/>\nacl Safe_ports port 873 # rsync<br \/>\nacl Safe_ports port 901 # SWAT<br \/>\nacl purge method PURGE<br \/>\nacl CONNECT method CONNECT<\/p>\n<p>http_reply_access allow all<\/p>\n<p># \u041f\u043e\u0440\u0442\u044b \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<br \/>\nhttp_port 3128<br \/>\nhttp_port 8080<\/p>\n<p># \u0417\u0434\u0435\u0441\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u043a \u043b\u043e\u0433-\u0444\u0430\u0439\u043b\u0443, \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430:<br \/>\naccess_log \/var\/log\/squid\/access.log squid<\/p>\n<p>refresh_pattern ^ftp: 1440 20% 10080<br \/>\nrefresh_pattern ^gopher: 1440 0% 1440<br \/>\nrefresh_pattern -i (\/cgi-bin\/|?) 0 0% 0<br \/>\nrefresh_pattern (Release|Package(.gz)*)$ 0 20% 2880<br \/>\nrefresh_pattern . 0 20% 4320<\/p>\n<p>acl apache rep_header Server ^Apache<\/p>\n<p># \u0417\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u043c \u0438\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f:<br \/>\nacl username proxy_auth REQUIED<br \/>\nacl username1 proxy_auth REQUIED<br \/>\nacl username2 proxy_auth REQUIED<br \/>\nhttp_access allow username<br \/>\nhttp_access allow username1<br \/>\nhttp_access allow username2<\/p>\n<p># \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (ACL) \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<br \/>\nacl complete_urls proxy_auth username<br \/>\nacl limited_urls proxy_auth username1<br \/>\nacl expanded_urls proxy_auth username2<\/p>\n<p># \u0414\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 good \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b google \u0438 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442:<br \/>\nacl good dstdomain .google.com .google.ru .oss-it.su<br \/>\n# \u0414\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 goodmail \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c gmail:<br \/>\nacl goodmail dstdom_regex gmail googlemail<br \/>\n# \u0414\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 expanded_sites \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0430\u0439\u0442\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u042f\u043d\u0434\u0435\u043a\u0441:<br \/>\nacl expanded_sites dstdomain .yandex.ru .ya.ru<br \/>\n# \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438:<br \/>\nacl localnetwork dst 192.168.0.0\/24<\/p>\n<p># \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f username \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 complete_urls \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430:<br \/>\nhttp_access allow complete_urls<\/p>\n<p># \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f username1 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 limited_urls \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b google:<br \/>\nhttp_access allow limited_urls good<br \/>\nhttp_access allow limited_urls goodmail<br \/>\nhttp_access allow limited_urls localnetwork<br \/>\nhttp_access deny limited_urls all<\/p>\n<p># \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f username2 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 expanded_urls \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u042f\u043d\u0434\u0435\u043a\u0441:<br \/>\nhttp_access allow expanded_urls good<br \/>\nhttp_access allow expanded_urls goodmail<br \/>\nhttp_access allow expanded_urls expanded_sites<br \/>\nhttp_access allow expanded_urls localnetwork<br \/>\nhttp_access deny expanded_urls all<\/p>\n<p>http_access allow manager localhost<br \/>\nhttp_access deny manager<br \/>\nhttp_access allow purge localhost<br \/>\nhttp_access deny purge<br \/>\nhttp_access deny !Safe_ports<br \/>\nhttp_access deny CONNECT !SSL_ports<br \/>\nhttp_access allow localhost<br \/>\nhttp_access deny all<\/p>\n<p>hosts_file \/etc\/hosts<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b.<br \/>\n\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 <i>squid<\/i> \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c <a href=\"http:\/\/www.visolve.com\/squid\/squid26\/contents.php\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432\u043d\u0435\u0441\u0435\u043d\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<p><code>sudo squid -k reconfigure<\/code><\/p>\n<p>\u041f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<p><code>sudo apt-get install apache2 libgd-gd2-perl perl<\/code><\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <i>\/var\/www<\/i>):<\/p>\n<p><code>cd \/var\/www\/<\/code><\/p>\n<p><a href=\"http:\/\/sourceforge.net\/projects\/lightsquid\/files\/\">\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 <i>lightsquid<\/i> \u0441 sourceforge<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <i>wget<\/i>:<\/p>\n<p><code>sudo wget http:\/\/sourceforge.net\/projects\/lightsquid\/files\/lightsquid\/1.8\/lightsquid-1.8.tgz<\/code><\/p>\n<p>\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<p><code>sudo tar -xzf lightsquid-1.8.tgz<\/code><\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u044b <i>lightsquid<\/i>:<\/p>\n<p><code>cd lightsquid-1.8<br \/>\nsudo chmod +x *.cgi<br \/>\nsudo chmod +x *.pl<\/code><\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u043f\u043a\u0435 <i>lightsquid<\/i>:<\/p>\n<p><code>cd \/var\/www\/<br \/>\nsudo chown -R www-data:www-data lightsquid-1.8<\/code><\/p>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u043e\u043a\u0441\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <i>apache<\/i> (<i>\/etc\/apache2\/apache2.conf<\/i>) \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<p><code>[Directory \"\/var\/www\/lightsquid-1.8\"]<br \/>\nAddHandler cgi-script .cgi<br \/>\nAllowOverride All<br \/>\n[\/Directory]<\/code><\/p>\n<p>(\u0433\u0434\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 [] \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0443\u0433\u043b\u043e\u0432\u044b\u0435 &lt;&gt;)<\/p>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<p><code>sudo \/etc\/init.d\/apache2 restart<\/code><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c <i>lightsquid.cfg<\/i> (\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \/var\/www\/lightsquid-1.8):<\/p>\n<p><code># \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u0442\u0435\u0439:<br \/>\n$cfgpath =\"\/var\/www\/lightsquid-1.8\";<br \/>\n$tplpath =\"\/var\/www\/lightsquid-1.8\/tpl\";<br \/>\n$langpath =\"\/var\/www\/lightsquid-1.8\/lang\";<br \/>\n$reportpath =\"\/var\/www\/lightsquid-1.8\/report\";<br \/>\n$ip2namepath =\"\/var\/www\/lightsquid-1.8\/ip2name\";<br \/>\n$logpath =\"\/var\/log\/squid\";<br \/>\n$lockpath =$reportpath;<br \/>\n$maxlocktime = 30*60;<br \/>\n$debug = 0;<br \/>\n$debug2 = 0;<br \/>\n$graphreport = 0;<br \/>\n# \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u0437\u044b\u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:<br \/>\n$lang =\"ru\";<\/code><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0443\u0442\u0435\u0439, \u044f\u0437\u044b\u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e <i>lightsquid<\/i> \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<br \/>\n\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 <i>lightsquid<\/i> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p><code>cd \/var\/www\/lightsquid-1.8<br \/>\nsudo .\/check-setup.pl<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0442\u0447\u0451\u0442\u0430:<\/p>\n<p><code>sudo .\/lightparser.pl<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<p><code>sudo crontab -e<\/code><\/p>\n<p>\u041a\u0443\u0434\u0430 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<p><code>*\/60 * * * * \/var\/www\/lightsquid-1.8\/lightparser.pl<\/code><\/p>\n<p>(\u0433\u0434\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0438\u043d\u0443\u0442 \u043c\u0435\u0436\u0434\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043e\u0442\u0447\u0451\u0442\u0430)<\/p>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u0440\u0435\u0441:<\/p>\n<p><code>http:\/\/localhost\/lightsquid-1.8<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Squid is a powerful proxy\u00adserver having a flexible configuration. While there are plenty of graphical user interfaces available for his proxy\u00adserver adjustment, this article addresses its simplest configuration by using the command line of Debian\/Ubuntu operating systems, with the statistics displayed. As a result, you will have the proxy\u00adserver running and being capable of managing and granting access to a multitude of users while monitoring the proxy&#8217;s activity.<\/p>\n","protected":false},"author":1,"featured_media":708,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[9],"class_list":["post-450","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-system","tag-network"],"_links":{"self":[{"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/posts\/450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/comments?post=450"}],"version-history":[{"count":2,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/posts\/450\/revisions"}],"predecessor-version":[{"id":710,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/posts\/450\/revisions\/710"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/media\/708"}],"wp:attachment":[{"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/media?parent=450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/categories?post=450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oss-it.su\/en\/wp-json\/wp\/v2\/tags?post=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}