I've got an issue with my apache system.
it's brand new, and so are I.
my problem now is that if somebody visit https://123.446.689.0 or https://b-site.com, (which don't have any ssl), then will a-site cut in on the https...
How can a connection jump like that? (of course a warning comes up, since the ssl is for another domain)
I WILL get ssl on b-site to, but can't get a ssl to the ip.
and all direct IP access should be redirect to another site. (which currently is 000-default)
these are my configuration files;
a-site.com.conf
<VirtualHost a-site.com:80>
ServerName a-site.com
DocumentRoot /var/www/a-site.com
<Directory /var/www/a-site.com>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.html index.php
Require all granted
</Directory>
<Directory /var/www/a-site.com/wp-content>
Options FollowSymLinks
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/a-site.error.log
CustomLog ${APACHE_LOG_DIR}/a-site.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =a-site.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
a-conf.com-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost a-site.com:443>
ServerName a-site.com
ServerAdmin arga@localhost
DocumentRoot /var/www/a-site.com
ErrorLog ${APACHE_LOG_DIR}/a-site.error.log
CustomLog ${APACHE_LOG_DIR}/a-site.access.log combined
SSLCertificateFile /etc/letsencrypt/live/a-site.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/a-site.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
Header always set Strict-Transport-Security "max-age=31536000"
</VirtualHost>
</IfModule>
000-default.conf
<VirtualHost 123.456.789.0:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/00
ErrorLog ${APACHE_LOG_DIR}/catchall.error.log
CustomLog ${APACHE_LOG_DIR}/catchall.access.log combined
</VirtualHost>
b-site.com.conf
<VirtualHost b-site.com:80>
ServerName b-site.com
DocumentRoot /var/www/b-site.com
<Directory /var/www/b-site.com>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.html index.php
Require all granted
</Directory>
<Directory /var/www/b-site.com/wp-content>
Options FollowSymLinks
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/b-site.error.log
CustomLog ${APACHE_LOG_DIR}/b-site.log combined
</VirtualHost>
000-default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/00
ErrorLog ${APACHE_LOG_DIR}/napto.def.error.log
CustomLog ${APACHE_LOG_DIR}/napto.def.access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>