假设我想购买一个可用于跨多个不同服务器和平台的 Web 服务器的通配符 SSL。
我可以为每个服务器发出一个 CSR,使用它们自己的私钥-公钥对,但是是否可以将私钥分发到所有不同的服务器并使用相同的证书?这样,只需发布 1 个 CSR,然后将其部署到混合平台。或者,不同平台颁发的证书是否不同?
目前的农场是以下农场的混合体:
Windows 2008 R2 和 IIS Linux 和 Tomcat(运行 JIRA 和 Confluence) Clavister 防火墙(不过我想我没有得到答案)
我们正在运行具有 Xeon CPU、32GB RAM 和运行 Centos 6 的 RAID SSD 的相当强大的专用服务器。然而,我们仍然看到 HTTPS 使我们的页面下载时间增加了 100 毫秒以上。有什么我们可以做的甚至可以加快 20 毫秒的速度吗?
以下是 Apache 设置:
SSLHonorCipherOrder on
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect file:/dev/urandom 512
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-EC$
SSLProxyCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECD$
SSLProtocol all -SSLv3 -SSLv2
SSLProxyProtocol all -SSLv3 -SSLv2
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/var/run/ssl_scache(5120000)"
SSLSessionCacheTimeout 300
SSLUseStapling On
SSLStaplingCache "shmcb:/var/run/ssl_stapling(128000)"
SSLStaplingReturnResponderErrors off
SSLStaplingStandardCacheTimeout 3600
SSLStaplingErrorCacheTimeout 600
SSLStaplingResponderTimeout 5
Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 上运行 Apache 2.4.20,并且配置了 SSL。我有一个SAN SSL 证书,www.example.com和www2.example.com共享同一个证书。
当我包含以下内容时,我收到421 Misdirected Request错误:
Protocols h2 h2c http/1.1
H2Upgrade on
H2Direct
H2WindowSize 128000
Run Code Online (Sandbox Code Playgroud)
如果我删除它们,网站会正常运行。
如果在同一浏览器上打开www.example.com和www2.example.com,我会收到错误消息。如果我先访问www.example.com,它将正确加载。当我从该 SAN SSL 证书加载第二个站点时出现错误,例如www2.example.com。我先去哪个网站并不重要。它总是在第二个站点上响应421 Misdirected Request。
我使用 HTTP/2 指令有什么问题?(顺便说一下,它们在 VirtualHost 中)
或者 HTTP/2 和 SAN SSL 实施是否存在问题?
如果重要的话,www.example.com 和 www2.example.com 都位于 AWS 中托管的同一台服务器上。
谢谢。
编辑:
我还尝试了以下设置,结果相同。
Protocols h2 http/1.1
H2Direct
H2WindowSize 128000
Run Code Online (Sandbox Code Playgroud)
在 SSL 配置中
<IfModule mod_ssl.c>
SSLRandomSeed startup …Run Code Online (Sandbox Code Playgroud) 似乎在为 HTTPS 连接上的主机名路由配置 HAProxy 时,包含一个tcp-request inspect-delay指令“让 HAProxy 有机会查看连接”至关重要。有没有办法让 NGINX 达到同样的效果,还是我应该开始打包并将我的整个服务器移动到 HAProxy?
(作为参考,这个问题来自我之前在这里表达的误解)
编辑
迈克尔,在评论中:
他似乎想在不实际终止 TLS 连接的情况下从客户端的握手尝试中“嗅探”SNI,以便做出下层连接代理决策,并盲目地将有效负载传送到后续机器以终止 TLS,因为对于出于某种原因,他不希望代理上的 TLS 证书和密钥,或者让代理根本不执行 TLS——只需嗅探 SNI 并使用从其内容派生的规则建立向内 TCP 连接。
理由是我需要后端应用程序中的证书和密钥(有些出于某种原因需要这样做),所以我必须向他们提供这些。必须在代理中设置它们本质上会使维护工作和出错的机会加倍。如果我可以不维护对代理的证书的访问权限,这将使我的架构更容易,并减少出错的机会。
frontend front
bind *:80
bind *:443 ssl crt /etc/haproxy/certs/server.pem ca-file /etc/haproxy/certs/id.crt verify required
option tcplog
mode http
default_backend app
backend app
balance roundrobin
cookie SERVERID insert
option ssl-hello-chk
mode http
option httpclose
option forwardfor
option httpchk get /WebApi/help
server app1 1.1.1.1:443 check ssl fall 1 rise 3 verify none cookie webA
server app2 1.1.1.2:443 check ssl fall 1 rise 3 verify none cookie webB
Run Code Online (Sandbox Code Playgroud)
对于某些页面/登录名/身份证,我需要要求客户端证书并将其发送到后端(IIS),后者将使用它进行身份验证,我找不到在某些路径上询问证书的方法,并且证书转发到后端也不起作用,以前config 正在使用“mode tcp”,它将所有内容转发到 IIS 并且它正在工作,但我需要使用“acl”将具有特定路径的请求转发到另一台服务器,但“acl”在 https 中不起作用,因此它应该是 http
我想我所有的流量重定向从http到https自动。如何将 301 重定向到我的所有域和子域?
这是 NGNIX 配置文件
upstream app_server {
server unix:/run/DigitalOceanOneClick/unicorn.sock fail_timeout=0;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name sprintsocial.io app.sprintsocial.io admin.sprintsocial.io;
# return 301 https://$server_name$request_uri;
}
server {
#listen 80;
listen 443;
root /home/rails/sprintsocial/public;
#server_name _;
server_name sprintsocial.io app.sprintsocial.io admin.sprintsocial.io;
ssl on;
ssl_certificate /home/sprintsocial.io.chained.crt;
ssl_certificate_key /home/sprintsocial.io.key;
index index.htm index.html;
# return 301 https://$server_name$request_uri;
# rewrite ^/(.*) https://app.sprintsocial.io/$1 permanent;
# rewrite ^/(.*) https://admin.sprintsocial.io/$1 permanent;
location / {
try_files $uri/index.html $uri.html $uri @app;
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试制作一个脚本来测试网站是否使用对其域有效的非自签名证书。这意味着它不会在浏览器中显示警告。
我试过
openssl s_client -connect www.example.com:443 -servername www.example.com
Run Code Online (Sandbox Code Playgroud)
即使证书对该域无效,我仍然得到:
验证返回码:0(确定)
知道我怎么能做到这一点吗?
我正在尝试在我的网站上设置 HTTPS/SSL test.example.com。
我编辑了我的文件,/etc/nginx/sites-enabled/my_site以便server {}块的顶部是这个。
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/cert_chain.crt;
ssl_certificate_key /etc/ssl/example.key;
server_name test.example.com;
error_log /var/log/nginx/debug.log debug;
... Rest of code ...
}
Run Code Online (Sandbox Code Playgroud)
我跑了nginx restart。但是如果我https://test.testexample.com在 Chromium 中访问,我的浏览器会警告我与该站点的连接不安全。
铬错误:
Your connection is not private
Attackers might be trying to steal your information from test.example.com (for example, passwords, messages, or credit cards). Learn more
NET::ERR_CERT_COMMON_NAME_INVALID
This server could not prove that it is test.example.com; its security certificate is from example.com. …Run Code Online (Sandbox Code Playgroud) 我试过搜索这个,我找到了接近的东西,但到目前为止我还没有找到任何有帮助的东西。如果这已经被问到,我提前道歉。
我有一个位于 HTTP VIP 后面的服务,并且运行良好。现在我正在尝试添加一个 TCP VIP 并在主机上执行 TLS 终止,但是当我运行 cURL 来测试它是否正常工作时(请告诉我是否有更好的方法来测试连接),我收到以下错误,但我不知道这是什么意思。从我从这个链接中读到的,我认为这与证书步骤不起作用有关,但我不知道如何找出它不起作用的原因。
有谁知道我做错了什么或如何解决这个问题?如果我需要提供任何其他信息,请告诉我。我对网络不是很有经验,所以很多这对我来说都是新的。
% curl -v https://my-tcp-vip.example.com/explorer/model.json
* Trying 192.0.2.x...
* TCP_NODELAY set
* Connected to my-tcp-vip.example.com (192.0.2.x) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS alert, Server hello (2):
* error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error
* stopped …Run Code Online (Sandbox Code Playgroud) 我遇到了一个问题,即某些首先尝试通过 HTTP/1.1 连接的客户端没有正确转发到 HTTPS
curl -v http://indentationerror.com/
* Trying 217.45.175.173:80...
* Connected to indentationerror.com (217.45.175.173) port 80 (#0)
> GET / HTTP/1.1
> Host: indentationerror.com
> User-Agent: curl/7.73.0
> Accept: */*
>
* Received HTTP/0.9 when not allowed
* Closing connection 0
curl: (1) Received HTTP/0.9 when not allowed
Run Code Online (Sandbox Code Playgroud)
但是,使用以下命令:
curl -v http://indentationerror.com/ --http2-prior-knowledge
Run Code Online (Sandbox Code Playgroud)
nginx 按预期通过 HTTP/2 返回 301 重定向
我的配置目前是:
server {
server_name www.indentationerror.com;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl on;
root "/http/indentationerror.com/www";
include /etc/nginx/genericHandlers/indentationerror.com;
} …Run Code Online (Sandbox Code Playgroud) https ×10
ssl ×5
nginx ×4
apache-2.4 ×2
haproxy ×2
tls ×2
certificate ×1
curl ×1
http ×1
performance ×1
redirect ×1
sni ×1
tcp ×1
ubuntu-14.04 ×1
x509 ×1