title: SNI Error Apache2 Logs
body: <p>today I am looking at the logs I found this anomaly in apache2.</p>
  
  <pre><code>[ssl:error] [pid 29646] AH02032: Hostname page_not_found provided via SNI and hostname www.site.ltd provided via HTTP are different
  </code></pre>
  
  <p>Since I'm not very knowledgeable on the subject, I read around some guidance but I did not understand a lot about how to fix it ...
  In my configuration I have one virtualhost which is the default. Any other file on apache or php are default</p>
  
  <p>I read the problem occurs when you have many virtual hosts with different certificates on a single place, but this is not my case ...</p>
  
  <p>How can i fix the problem? Below can you find the configuration!</p>
  
  <p>PHP 5.6.17-3+deb.sury.org~trusty+1 (cli)</p>
  
  <p>Server version: Apache/2.4.7 (Ubuntu)</p>
  
  <p>/etc/host is default file</p>
  
  <p>default-ssl.conf</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName www.site.ltd
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>default-ssl.conf</p>
  
  <pre><code>&lt;IfModule mod_ssl.c&gt;
      &lt;VirtualHost *:443&gt;
          SSLEngine On
          ServerAdmin webmaster@localhost
          SSLStrictSNIVHostCheck off
          ServerName www.site.ltd
          DocumentRoot /var/www/html
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
          SSLEngine on
  
          SSLCertificateFile    /etc/apache2/ssl/site.crt
          SSLCertificateKeyFile /etc/apache2/ssl/site.key
  
          SSLCACertificateFile /etc/apache2/ssl/intermediate_site_ca.crt
  
          &lt;FilesMatch "\.(cgi|shtml|phtml|php)$"&gt;
                  SSLOptions +StdEnvVars
          &lt;/FilesMatch&gt;
          &lt;Directory /usr/lib/cgi-bin&gt;
                  SSLOptions +StdEnvVars
          &lt;/Directory&gt;
  
          BrowserMatch "MSIE [2-6]" \
                  nokeepalive ssl-unclean-shutdown \
                  downgrade-1.0 force-response-1.0
          # MSIE 7 and newer should be able to use keepalive
          BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  
      &lt;/VirtualHost&gt;
  &lt;/IfModule&gt;
  
  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  </code></pre>