我有两个由 CentOS 实例提供服务的网站。其中一个启用了 SSL,另一个仅在端口 80 上提供服务。
所以,http://siteone.com和https://siteone.com两个做工精细,一样http://sitetwo.com。
问题是https://sitetwo.com显示https://siteone.com.
我有一个可用的公共 IP 地址。
我认为我无法从一个 IP 为两个 https 站点提供服务,但是否至少有一种方法可以将 https 重定向到端口 80,https://sitetwo.com而不是为错误的站点提供服务?
sudo apachectl -S
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
?
xxx.xxx.xxx.xxx:443 siteone.com (/etc/httpd/sites-enabled/ssl-siteone.conf:1)
*:80 is a NameVirtualHost
default server beta-siteone (/etc/httpd/sites-enabled/beta-siteone.conf:1)
port 80 namevhost beta-ilegis (/etc/httpd/sites-enabled/beta-siteone.conf:1)
alias beta.siteone.com
port 80 …Run Code Online (Sandbox Code Playgroud)