【发布时间】:2018-08-31 16:35:31
【问题描述】:
我已尝试寻找与我的问题相关的帖子,但找不到合适的帖子。如果有,请告诉我!
这是我现在面临的现状。我想重定向一个域,
example.hr
它正在与另一台服务器一起使用,并且附带一个 SSL。
现在,我有另一个域附带的服务器,
example.co
还有一个 SSL 证书。
我想将 test.example.hr 重定向到 https://example.co。我该怎么做呢?由于使用了根域,因此我正在使用子域对其进行测试。
这个方法我试过了,
<VirtualHost *:80>
ServerName test.example.hr
ServerAlias www.test.example.hr
Redirect / https://example.co/
</VirtualHost>
<VirtualHost *:443>
ServerName example.co
ServerAlias www.example.co
DocumentRoot /var/www/html
ErrorLog /var/www/html/error.log
CustomLog /var/www/html/access.log combined
</VirtualHost>
SSL 配置在 443 块内。
当我转到 test.example.hr 时,它会更改为 https://test.example.hr 并且出现的错误是“您的连接不是私有的。攻击者可能试图从 test.alt.hr 窃取您的信息(例如例如,密码、消息或信用卡)。了解更多 NET::ERR_CERT_COMMON_NAME_INVALID"
【问题讨论】:
标签: apache ssl redirect url-redirection