Build CentOS 6 Server (+)-squid, Varnish

Source: Internet
Author: User
Tags varnish

(a) Squid

Installation

Java code
    1. # yum Install Httpd-tools-y
    2. # htpasswd-c-b/etc/squid/passwords squiduser 123456
    3. # yum Install Squid-y



Set up

Java code
    1. # Cp/etc/squid/squid.conf/etc/squid/squid.conf.bak
    2. # vi/etc/squid/squid.conf
    3. Auth_param Basic Program/usr/lib64/squid/ncsa_auth/etc/squid/passwords
    4. Auth_param Basic Realm Proxy
    5. ACL authenticated Proxy_auth REQUIRED
    6. Http_access Allow authenticated
    7. Forwarded_for Delete
    8. Http_port 0.0. 0.0:3128



Start the service

Java code
    1. #/etc/init.d/squid Start



(ii) Varnish

Installation

Java code
    1. # RPM--nosignature-i https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm
    2. # Yum Install-y Varnish
    3. # varnishd-v



Set up

Java code
    1. # Vi/etc/sysconfig/varnish
    2. varnish_listen_port=6081
    3. # vi/etc/varnish/DEFAULT.VCL
    4. Backend Default {
    5. . Host = "127.0.0.1";
    6. . Port = "81";
    7. }
    8. # varnishd-c-f/etc/varnish/default.vcl



Start the service

Java code
    1. # Service Varnish Start
    2. # service VARNISHNCSA Start
    3. # service Varnishlog Start



Confirm

Java code
      1. # Varnishadm Backend.list

Build CentOS 6 Server (+)-squid, Varnish

Related Article

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.