Squid Proxy Server Installation configuration

Source: Internet
Author: User
Tags squid proxy

ubuntu16.04 Installing Squid Proxy server configuration

This article references

Http://www.cnblogs.com/newflypig/archive/2012/09/28/2862000.html

1. Remove existing Squid service

sudo apt-get autoremove squid

sudo apt-get autoremove Squid-common

If an error occurs

Get lock /var/lib/dpkg/Lock

Perform steps

sudo rm-rf/var/cache/apt/archives/lock
sudo rm-rf/var/lib/dpkg/lock

2, install Squid

sudo apt-get install squid Squid-common

3, modify the configuration

sudo vim/etc/squid/squid.conf

#squid默认配制是不让任何用记使用它的, you need to make the appropriate changes. #squid. conf are all annotations, and no actual configuration, can be deleted all, paste my own squid.conf file:
Http_port0.0.0.0:3128#使用IPV4的3128端口作为代理服务器端口cache_dir UFS/var/spool/squid + - 1024x768#缓存目录cache_access_log/var/log/squid/Access.log #接入的日志文件cache_log/var/log/squid/Cache.log #缓存日志cache_store_log/var/log/squid/Store.log #存储日志pid_filename/var/run/squid.pid #进程ID cache_mgr [email protected] #随意填一个email Cache_mem +MB #缓存大小cache_swap_low -#最小交换空间cache_swap_high the#最大交换空间maximum_object_size4096kbmaximum_object_size_in_memory8KB
#代理用户认证使用apache加密认证, you can cancel #auth_param Basic program here because my environment is using Nginx/usr/lib/squid3/ncsa_auth/etc/squid3/squid_passwd #以上都没意思, here is the point, use NCSA to read the encrypted user password #acl ncsa_users proxy_auth REQUIRED #代理身份使用认证模式 #http_ Access Allow Ncsa_users #所有IP都可以使用代理

4, initial Setup

Check that the configuration file is correct and initialize it if it is correct
sudo squid3-k parse #检验: If there is no error message output, congratulations, you can use squid.

5, Initialize cache space

sudo squid-z If prompted for any permissions issues, it is recommended to use the chmod command in the configuration file for various cache paths +777 /var/log/squid/  777 /var/log/squid/777 /var/log/squid/store.log

6. Start the proxy server

Sudo/etc/init.d/squid restart

7, test

Open Browser settings proxy server ID + port 3128

Squid Proxy Server Installation configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.