I searched a lot on how to create multiple subdomains pointing to the same IP address but to different sites and I found that with apache you can do it using the HTTP Host header and it works, but when I switch to HTTPS it doesn't work anymore because I saw that in the HTTPS protocol the Host header doesn't exist. How can I do that with HTTPS?
This is my current apache HTTP config file
000-domain.com.conf
<VirtualHost *:80>
ServerName sub1.domain.com
ServerAlias sub1.domain.com
ServerAlias *.sub1.domain.com
DocumentRoot "/var/www/sub1"
</VirtualHost>
<VirtualHost *:80>
ServerName sub2.domain.com
ServerAlias sub2.domain.com
ServerAlias *.sub2.domain.com
DocumentRoot /var/www/sub2
</VirtualHost>