I have a VPS with Ubuntu 14.04 with two websites A and B.
I set up HTTPS for website A and everything is ok with https://a.com.
I don't want B to have HTTPS but when I access https://b.com, Chrome throws me a warning and if I proceed to continue viewing the website, it renders the website A.
Also, main IP of the VPS is IP1 (Which is used for website B), and I purchased another IP address IP2 (used for website A).
What do I need to change in my configuration to make Apache use separate IP addresses for the two sites?
These are the config files:
a.com-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin lienhe.a.com
ServerName a.com
ServerAlias www.a.com
DocumentRoot "/var/www/a/frontend/web"
<Directory "/var/www/a/frontend/web">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/a.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/a.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/a.com/chain.pem
</VirtualHost>
</IfModule>
a.com.conf
<VirtualHost *:80>
ServerAdmin lienhe.a.com
ServerName a.com
ServerAlias www.a.com
DocumentRoot "/var/www/a/frontend/web"
<Directory "/var/www/a/frontend/web">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =a.com [OR]
RewriteCond %{SERVER_NAME} =www.a.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
b.com.conf
<VirtualHost *:80>
ServerAdmin cskh.b.com
ServerName b.com
ServerAlias www.b.com
DocumentRoot "/var/www/b"
<Directory "/var/www/b">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>