Can somebody tell me what I'm doing wrong here, I have 1 server running Apache 2.4 with 3 VirtualHosts in it, setup this way:
<VirtualHost helpedsk.example.com:80>
ServerAdmin nobody@example.com
DocumentRoot "${SRVROOT}/htdocs/hesk"
ServerName helpdesk.example.com
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
<Directory "${SRVROOT}/htdocs/hesk">
Require all granted
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost wiki.example.com:80>
ServerAdmin nobody@example.com
DocumentRoot "${SRVROOT}/htdocs/dokuwiki"
ServerName wiki.example.com
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
<Directory "${SRVROOT}/htdocs/dokuwiki">
Require all granted
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost docs.example.com:80>
ServerAdmin nobody@example.com
DocumentRoot "${SRVROOT}/htdocs/drupal"
ServerName docs.example.com
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
<Directory "${SRVROOT}/htdocs/drupal">
Require all granted
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
But for some reason only the last one works, the first one shows me the the document root of the server (without hesk) and the second one goes into an unlimited redirection to itself and I can't figure out why, the second one probably has to do because I set it up pointing to the server ip/dokuwiki that I can change later, but why is the first one not going to hesk?
All these sites work fine when accessed using serverip/site but when trying to be accessed by name, only the last one works.