LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /var/www/html

    <Directory "/var/www/html">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride All
        Require all granted
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost _default_:443>

  DocumentRoot "/var/www/html"
  ServerName localhost:443
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined

  SSLEngine on

  SSLCertificateFile "/etc/apache2/sites-available/ssl/localhost.crt"
  SSLCertificateKeyFile "/etc/apache2/sites-available/ssl/localhost.key"

  <FilesMatch "\.(cgi|shtml|phtml|php)$">
      SSLOptions +StdEnvVars
  </FilesMatch>

  <Directory "/var/www/html">
      Options Indexes FollowSymLinks Includes execCGI
      AllowOverride All
      Require all granted
  </Directory>

</VirtualHost>