我使用此重定向将https://username.mywebsite.com/重定向到https://mywebsite.com/username
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*).mywebsite.com [NC]
RewriteRule .* https://mywebsite.com/%1
OR
RewriteCond %{HTTP_HOST} ^([^.]+)\.mywebsite\.com
RewriteRule ^(.*)$ https://mywebsite.com/%1 [L,NC,QSA,R]但是,当我使用subdoamin尝试我的页面时,我得到了这个错误:
这个网站的安全证书有问题。本网站提供的安全证书是为另一个网站的地址签发的。安全证书问题可能表示有人试图欺骗您或拦截发送到服务器的任何数据。我们建议您关闭此网页,不要继续访问此网站。这里推荐iconClick关闭此网页。本网站不推荐iconContinue (不推荐)。
我可以点击“继续这个网站(不推荐)”。而我的浏览器忽略了错误,但这对用户并不友好。
我有无限的用户,我的SSL是通配符。我不希望用户得到这个错误:
我在路由中添加了*.mywebsite.com
这是五月ssl配置
<VirtualHost *:443>
ServerName mywebsite.com
ServerAdmin webmaster@mywebsite.com
DocumentRoot /var/www/html/mywebsite.com
RewriteEngine on
SSLEngine on
#SSLProxyEngine on
SSLCertificateFile /etc/apache2/ssl/markethive.com/mywebsite.crt
SSLCertificateKeyFile /etc/apache2/ssl/markethive.com/mywebsite.key
SSLCACertificateFile /etc/apache2/ssl/markethive.com/mywebsite.ca-bundle
LogLevel info
ErrorLog /var/log/apache2/markethive.com_ssl/error.log
CustomLog /var/log/apache2/markethive.com_ssl/ssl.log combined
</VirtualHost>有什么帮助吗。
发布于 2015-11-23 16:44:36
这意味着您的SSL证书不是valide证书(可能是您自己签名的吗?)
<VirtualHost _default_:443>
..
SSLCertificateFile /etc/apache2/ssl/markethive.com/mywebsite_com.crt
SSLCertificateKeyFile /etc/apache2/ssl/markethive.com/mywebsite_com.key
SSLCACertificateFile /etc/apache2/ssl/markethive.com/mywebsite_com.ca-bundle
...
</VirtualHost>
<VirtualHost *:443>
...
#your server conf
...
</VirtualHost>https://serverfault.com/questions/738372
复制相似问题