Что не так с моим конфигом?
не заходит на сайт через www.site.com - браузер пишет NET::ERR_CERT_COMMON_NAME_INVALID
и сайт использует hsts протокол!
<VirtualHost *:80>
ServerName site.com
ServerAlias *.site.com
ServerAlias site.com
ServerAdmin webmaster@site.com
Redirect 301 / https://site.com/
</VirtualHost>
<IfModule mod_ssl.c>
SSLStaplingCache shmcb:/tmp/stapling_cache(128000)
<VirtualHost *:443>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
ServerName site.com
ServerAdmin webmaster@dimboy.com
RewriteEngine On
RewriteOptions inherit
# Redirect
RewriteCond %{HTTP_HOST} !^site\.com$ [NC]
RewriteRule ^ https://site.com%{REQUEST_URI} [L,R=301]
# Indexes + Directory Root.
DocumentRoot /home/www/site.com/
AddDefaultCharset utf-8
<Directory "/home/www/site.com">
Options None
AllowOverride All
Require all granted
Options Indexes FollowSymLinks
</Directory>
ErrorLog /home/www/site.com/error.log
# SSL
SSLEngine on
SSLCertificateKeyFile /etc/apache2/ssl/site/www.site.com.key
SSLCertificateFile /etc/apache2/ssl/site/2_www.site.com.crt
SSLCACertificateFile /etc/apache2/ssl/site/1_root_bundle.crt
SSLUseStapling on
</VirtualHost>
</IfModule>