I've got two websites being served from a CentOS instance. One of those has SSL enabled, the other is just served on port 80.
So, http://siteone.com
and https://siteone.com
both work fine, as does http://sitetwo.com
.
The issue is that https://sitetwo.com
displays https://siteone.com
.
I have one public IP address available.
I think it's the case that I can't serve two https sites from one IP, but is there at least a way to redirect https to port 80 for https://sitetwo.com
instead of serving the wrong site?
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 namevhost siteone.com (/etc/httpd/sites-enabled/siteone.conf:1)
alias www.siteone.com
port 80 namevhost sitetwo.com (/etc/httpd/sites-enabled/sitetwo.com.conf:1)
alias www.sitetwo.com
*:443 is a NameVirtualHost
default server xxx.xxx.xxx.xxx (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost xxx.xxx.xxx.xxx (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost xxx.xxx.xxx.xxx (/etc/httpd/sites-enabled/ssl-sitetwo.com.conf:1)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48