我使用以下命令创build了具有自签名证书的分段站点:
mkdir /etc/ssl/wildcard.yourdomain.com cd /etc/ssl/wildcard.yourdomain.com/ openssl genrsa 2048 > host.key openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert openssl x509 -noout -fingerprint -text < host.cert > host.info cat host.cert host.key > host.pem chmod 400 host.key host.pem sudo a2enmod ssl sudo service apache2 restart <VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/ssl/wildcard.yourdomain.com/host.pem SSLCertificateKeyFile /etc/ssl/wildcard.yourdomain.com/host.key
(来自http://blog.justin.kelly.org.au/how-to-create-self-signed-wildcard-ssl-certificates-for-apache/ )
我遇到的问题是*。你的域名只是悬挂。
我成立了
ServerAlias www.yourdomain.com
以及
ServerName yourdomain.com
当我导航到“yourdomain.com”它按预期的方式工作。
但是当我input: https : //www.yourdomain.com铬在右下angular说“build立一个安全的连接”
我启用了mod_ssldebugging级别的日志logging,但是当我用wwwinputurl时没有任何logging。 我的最终目标是将wwwredirect到我的根域https://yourdomain.com 。 任何帮助将不胜感激。
我正在使用namecheap的免费dynamicDNS:
Hostname, IPADDRESS URL, RECORD TYPE, TTL @ myip A Address 1800 www https://yourdomain.com URL Redirect 1800 SUb Domain SEttings: * https://yourdomain.com URL Redirect 1800
对于子域名设置,我也尝试了https://*.yourdomain.com
谢谢
您的DNS提供商的名称服务器中的URLredirectconfiguration不适用于SSL。
这种redirect的实现实际上意味着提供者在该名称上configuration了一条Alogging,指向他们的服务器,然后发送HTTPredirect。
那些发送redirect的服务器没有任何方法可以为您的域拥有有效的SSL证书,因此它们仅在HTTP上侦听 – HTTPS连接将始终失败。
您的服务器将需要直接为www名称提供HTTPS连接(如果需要,则发送redirect本身) – 将www名称的logging更改为指向您服务器的A或CNAME (如果是CNAME ,则指向它到yourdomain.com. )。