Articles of https

网站只能通过Chrome和curl访问

我正尝试使用nginx从EC2实例提供静态网站。 我也使用Cloudflare作为CDN和DNS。 Alogging指向我的实例的公有IP,同时还有一个用于www的CNAME,它parsing为非www域。 该网站工作得很好,Chrome浏览器和curl,但我得到一个Firefox和Safari的连接错误。 这是Cloudflare上的DNSconfiguration: 这是我的网站configuration: server { listen 80; server_name www.duomov.com; client_max_body_size 100M; root /var/www/duomov/duomov-website; location / { try_files $uri $uri/ =404; } if ($http_x_forwarded_proto = "http") { return 301 https://$server_name$request_uri; } } server { server_name duomov.com; return 301 https://www.duomov.com$request_uri; } server { listen 443; server_name duomov.com; return 301 https://www.duomov.com$request_uri; }

无法连接到通过HTTPS Web服务器使用快照创build的新GCP虚拟机

我一直使用启用了https的Web服务器(Windows Server 2016)的GCP虚拟机。 现在,我希望使用从现有VM创build的快照在NEW区域中恢复/复制受https保护的Web服务器。 新的虚拟机在GCP控制台的新区域中创build好了,但是当我想要使用自动分配的外部IP(使用远程桌面连接)访问此虚拟机时,它会显示错误消息,指出新虚拟机无法连接。 我想知道这是否与在现有虚拟机上启用的https做? 在禁用或删除https后,是否应该为现有的Web服务器创build新的快照? 非常感谢你。

SSL在Apache上工作,但不在Nginx上

在Apache上的SSLconfiguration SSLEngine On SSLCertificateFile /etc/ssl/domain.crt SSLCertificateKeyFile /etc/ssl/domain.key 这工作得很好 Nginx的: ssl on; ssl_certificate /etc/ssl/domain.crt; ssl_certificate_key /etc/ssl/domain.key; curl给出: * SSL certificate problem: Invalid certificate chain * Curl_http_done: called premature == 1 * Closing connection 0 curl: (60) SSL certificate problem: Invalid certificate chain 铬说: net::ERR_CERT_DATE_INVALID 任何错误的我的nginx conf?

openVPN和433端口上的myhttpd

我试图设置OpenVPN来侦听Asteror NAS上的443端口,然后通过基于以下方式的port-share选项将所有HTTPS通信传递给Apache: 使用Apache / SSL的OpenVPN端口共享 但是我没有得到它的工作。 我认为问题是,端口443似乎正在听一个进程myhttp。 当我运行#netstat -tulpn | grep LISTEN命令,我会得到这个结果: tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 4475 / myhttpd 当我将OpenVPN上的端口更改为444并运行#netstat -tulpn | grep LISTEN命令再次,我会得到下一个结果: tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 4475 / myhttpd tcp 0 0 0.0.0.0:444 0.0.0.0:* LISTEN 1507 / openvpn tcp 0 0 127.0.0.1:1195 0.0.0.0:* LISTEN 1507 / openvpn 我不知道如何解决这个问题。 有没有人有build议?

如何使用NGINX作为具有客户端证书的https服务的代理

我负责使用客户端证书进行身份validation的节点应用程序。 如果我使用HTTPS从浏览器直接连接到此应用程序,系统会提示input我的客户端证书,并且按预期工作。 如果我禁用https并将其作为使用proxy_pass的启用了HTTPS的nginx(使用相同的服务器密钥和证书)的HTTP服务器运行,则不会提示input客户端证书。 如果我在节点应用程序上使用https,我似乎无法通过代理从nginx传递它。 我已经尝试将proxy_pass http:// my-upstream-entry改为https:// my-upstream-entry ,但在此之后,在nginx错误日志中收到类似于以下内容的消息: 2017/07/26 17:55:10 [error] 6687#6687: *380 upstream prematurely closed connection while reading response from upstream, client: 192.168.10.1, server: _, request: "GET /login HTTP/1.1", upstream: "http://127.0.0.1:1234/login" 基于此,我有两个问题: 如何将proxy_pass传递给启用了TLS的节点服务? 是否可以从应用程序传递客户端证书请求,然后将生成的证书传递给proxy_passed目标? 谢谢,

Nginx:redirectHTTPS站点到www HTTPS,需要证书吗?

我有一个example.com和www.example.com的证书和以下configuration: server { listen 443 ssl; listen [::]:443 ssl; server_name example.com; return 301 https://www.example.com$request_uri; } 我正在尝试redirect到www.example.com ,它在我访问https://example.com时起作用。 我成功redirect。 但我不明白为什么它的作品。 301redirect应该通过SSL进行,但是我没有指定证书。 它怎么能工作? 另外,什么是build议的方式来做到这一点? 只是在上面的块中添加证书?

在GCE负载平衡和健康检查等

我试图在GCE之上的CoreOS上build立一个安全的etcd集群。 我想通过某种负载平衡在多个etcd节点之间分配负载。 我想要一个负载平衡器,它具有一个外部IP(使得etcd集群可以从任何地方用于其他目的),并且能够将负载分配给节点池。 看来,GCEnetworking负载平衡器满足所有这些标准,但有一个问题 – 它只能使用传统的HTTP健康检查来validation工作节点。 此外,还有一个内部的区域负载平衡器,但是正如其名称所述 – 它只给内部IP地址提供LB,所以该集群将不能从外部访问。 有没有已知的解决方法? 也许有一些方法来主机/ etcd与不安全的HTTP的健康。 也许有一些方法将HTTPS健康检查附加到networking负载平衡器? 也许有某种代理,它可以检查/健康,然后通过HTTP报告? 谢谢!

为什么HTTPS文件无法在HTTP页面上加载?

什么情况下HTTPS资源(脚本?图像?video?iframe?)将无法加载到HTTP页面内? 这些文件是从IIS 8.5提供的,而且这个问题发生在多个浏览器上。 当文件作为HTTP发送时,页面正常工作。 我知道反向(HTTPS页面上的HTTP文件)可能会出于安全原因的问题,但这不应该在这里,对吗? 另外,同一原则策略仅适用于跨多个页面的脚本,并且不应该影响从同一服务器加载到单个页面的文件?

虚拟主机中的一个特定的子域不redirect,但是其他的成功

我喜欢我的网站可以通过example.org或https://example.org而不是www.example.org 。 所以我希望http://www.example.orgredirect到http://example.org和http://www.example.org到https://example.org 。 但有趣的事情发生: https://www.example.orgredirect到https://example.org 而不是http://www.example.org到http://example.org 我的main.conf: <VirtualHost *:80> ServerName example.org ServerAdmin webmaster@localhost DocumentRoot "/var/www/html" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <VirtualHost *:443> ServerName example.org ServerAdmin webmaster@localhost DocumentRoot "/var/www/html" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLCertificateFile /pathtocert.pem SSLCertificateKeyFile /pathtokey.pem </VirtualHost> <Directory "/var/www/html"> Options FollowSymlinks ExecCGI AllowOverride None Require all granted </Directory> 我的www.conf: <VirtualHost *:80> ServerName […]

在子域上configurationnginx -http httpsredirect

我试图设置一个Web服务器,将强制https。 目前根域(我称之为name.com)redirect到https没有问题,但子域(my.name.com)没有。 https://my.name.com确实工作。 这是我的configuration文件: server { listen 80; listen [::]:80; return 301 https://$host$request_uri; } server { # SSL configuration listen 443 ssl default_server; listen [::]:443 ssl default_server; root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name my.name.com www.my.name.com; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header […]