I have a running apache2 server, I want to host an angular application on it, so I built the angular application using ng build then I created the configuration file for apache and I added .htaccess configuration to enable internal routes. All running correctly using HTTP port 80.
Now I want to run my application only using HTTPS, so I created a certificate and changed the apache configuration to 443 and added certification inside it. HTTPS is working now but only the index page is running. Internal routes show "Not Found" (as if I do not have .htaccess).
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html
000-default.conf
<VirtualHost *:443>
ServerAdmin MYSERVERNAME
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/certificate/apache-certificate.crt
SSLCertificateKeyFile /etc/apache2/certificate/apache.key
</VirtualHost>