AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 118055
Accepted
tylerl
tylerl
Asked: 2010-03-02 13:18:06 +0800 CST2010-03-02 13:18:06 +0800 CST 2010-03-02 13:18:06 +0800 CST

带有可选 SSL 的 Squid 反向代理

  • 772

我正在尝试将 squid 设置为负载平衡反向代理,但我在使用 SSL 时遇到了一些问题。该站点的一个应用程序检查站点是否通过 SSL 加载,如果是这种情况,则行为不同,因此我需要通过 SSL 代理 SSL 连接,并且在没有它的情况下代理非 SSL 连接。

现在,squid 服务器接受通过 HTTP 和 HTTPS 的连接,但它只通过 HTTP 与上游服务器建立连接。

我的 squid 配置中有趣的部分如下所示:

http_port 80 vhost vport
https_port 443 vhost vport  cert=/etc/cert.pem key=/etc/cert.key
cache_peer 10.0.0.10 parent 80 0 originserver round-robin
cache_peer 10.0.0.11 parent 80 0 originserver round-robin

有没有一种简单的方法可以告诉它通过 SSL 代理上游的 SSL 连接,同时不理会其他人?

proxy squid ssl reverse-proxy
  • 1 1 个回答
  • 5893 Views

1 个回答

  • Voted
  1. Best Answer
    quadruplebucky
    2010-03-02T14:48:56+08:002010-03-02T14:48:56+08:00

    更新(实际上是从我的鱿鱼中尝试过的......):

    acl is_ssl port 443
    https_port 443 cert=<yourcert> key=<yourkey> accel name=site_ssl defaultsite=<y\
    our_external_site>
    cache_peer <your_internal_ssl> parent 443 0 no-query originserver ssl sslflags=\
    DONT_VERIFY_PEER name=site_ssl
    cache_peer_access site_ssl allow is_ssl
    cache_peer_access site_ssl deny !is_ssl
    
    acl nonssl port 80
    http_port 80 accel defaultsite=<your_external_site>  name=site_nonssl
    cache_peer <your_internal_nonssl> parent 80 0 no-query name=site_nonssl origins\
    erver
    cache_peer_access site_nonssl allow nonssl
    cache_peer_access site_nonssl deny !is_nonssl
    

    原始答案如下:

    你想要类似的东西

    cache_peer 10.0.0.11 parent 443 0 no-query originserver ssl sslflags=DONT_VERIFY_PEER name=site_ssl
    acl sites_server_3 dstdomain site_ssl
    cache_peer_access site_ssl allow ssl_servers
    http_access allow ssl_servers
    
    • 4

相关问题

  • 持续监控许多服务器运行状况的简单方法?

  • Web 代理脚本与 http 代理的效率?

  • 为将笔记本电脑带回家的用户模拟公司代理

  • 什么是 Microsoft 代理客户端(MSP 客户端)

  • 使用大量 javascript 的页面上的鱿鱼速度很慢

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve