You need one
NameVirtualHost per criteria, it tells Apache how it will triage incoming requests. If you want name-based virtual hosting on port 80, you only need
Any HTTP client connecting on port 80 will be triaged along the
'Name:' HTTP header, matching a ServerName or ServerAlias in on of the
<VirtualHost *:80> nodes (or the first defined vhost for the same critera if not match is found).
Most of the time you only need two name-based virtual hosting rules : on for port 80, on for port 443 (the latter only really making sense with SNI / Server Name Indication). This is usually done in an automatic manner where the port 443 and *:433 named-based virtual hosting is activated if mod_ssl is activated :
In your case, it seems you relyon the usual IP/port-based virtual hosting. In this case every app will need the same code:
And here the
NameVirtualHost is not needed since you only have one virtual host per port. The
is also mostly irrelevant, it will be used by Apache to refer to the vhost in errors.