What should be the document directory for
virtualhost:80
And
virtualhost:443
should both the document root directory be same , we are getting 404 error on SSL 443 port
<VirtualHost *:80> ServerAdmin [email protected] ServerName www.example.com ServerAlias example.com DocumentRoot /var/www/html/example.com <Directory /var/www/html/example.com> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/example.com-error_log CustomLog /var/log/apache2/example.com-access_log common </VirtualHost> <VirtualHost *:443> ServerAdmin [email protected] DocumentRoot /var/www/html/example.com <Directory /var/www/html/example.com> Options +FollowSymLinks AllowOverride none Require all granted RewriteEngine On </Directory> ServerName www.example.com ServerAlias example.com ServerAlias mail.example.com SSLEngine on SSLCertificateFile /etc/letsencrypt/live/example.com/certificate.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/private.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/fullchain.pem ErrorLog ${APACHE_LOG_DIR}/error.log #CustomLog ${APACHE_LOG_DIR}/access.log </VirtualHost>