already did my research and Im burned after reading and watching videos for hours; I can't make virtual hosts works at all, it doest matter which configuration I set but Apache will ignore it and always try to load the content within /var/www/html
The goal is to write the address on a browser and access different sites like this app.example.ca, blog.example.ca, www.example.ca (Im running a recursive DNS server)
My current configuration (Although I've tried many others) is the next one:
http.conf (Default config, added a line):
IncludeOptional sites-enabled/*.conf
app.conf (Only virtual host config file):
<VirtualHost *:443>
ServerName app.friscia.ca
ServerAlias app.friscia.ca
DocumentRoot /var/www/html/app
ErrorLog /var/www/html/app/error.log
</VirtualHost>
DNS Zone Content:
$TTL 10800 ; 3 hours
friscia.ca IN SOA friscia.ca. hostmaster.friscia.ca. (
7 ; serial
86400 ; refresh (1 day)
3600 ; retry (1 hour)
604800 ; expire (1 week)
10800 ; minimum (3 hours)
)
NS ns1.friscia.ca.
NS ns2.friscia.ca.
A 10.211.55.10
$ORIGIN friscia.ca.
$TTL 300 ; 5 minutes
EZEQUIELLFR2FBC A 10.211.55.100
TXT "31ed3c4417f785d3f24002d6f3c02f2edc"
$TTL 10800 ; 3 hours
ns1 A 10.211.55.10
ns2 A 10.211.55.11
www A 10.211.55.10
app A 10.211.55.10