Centos7 Apache Squid https forward proxy

Source: Internet
Author: User

    • Apache
Yum Install httpd mod_ssl-/etc/httpd/conf.d/443  HTTPS<virtualhost *: 443>
ServerName example.com sslengineon/cert/server.crt /cert/ Server.key proxyrequests on proxyvia in <proxy *> Order deny,allow allow from all </Proxy></VirtualHost>systemctl restart httpd

    • Nginx

Nginx default does not support proxy HTTPS requires third-party module support

Compile and install Nginx

Yum InstallGcGCC GCC-c++ Pcre-devel Zlib-devel Openssl-develPatch wget-ywgethttp//nginx.org/download/nginx-1.9.2.tar.gzwgetHttps//Github.com/chobits/ngx_http_proxy_connect_module/archive/master.zipTar-XZVF nginx-1.9.2.Tar. GZUnzipMaster.ZipCD Nginx-1.9.2Patch-p1 <. /ngx_http_proxy_connect_module-Master/Patch/proxy_connect.Patch./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-http_gzip_static _module--with-stream--add-module=/root/ngx_http_proxy_connect_module-Master Make&& Make Install

Nginx configuration file

Vim/usr/local/nginx/conf/nginx.conf

Worker_processes1; events {Worker_connections1024x768;} HTTP {include mime.types; Default_type Application/octet-stream; Sendfile on; Keepalive_timeout $; server {Listen443SSL; Resolver8.8.8.8; SSL on; Ssl_certificate/cert/SERVER.CRT; Ssl_certificate_key/cert/Server.key; Ssl_protocols TLSv1 TLSv1.1TLSv1.2; server_name example.com; Proxy_connect; Proxy_connect_allow443 563; Proxy_connect_connect_timeout 10s; Proxy_connect_read_timeout 10s; Proxy_connect_send_timeout 10s; Location/{proxy_pass https://$host;Proxy_set_header Host $host; } } }

/usr/local/nginx/sbin/nginx

    • Squid
Yum Install squid-/etc/squid/8443 cert=/cert/server.crt key=/cert/   8.8. 8.8 http_access allow allsystemctl restart squid

Centos7 Apache Squid https forward proxy

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.