Setting multiple Apache2 VirtualHosts with the same DocumentRoot?
- by sobi3ch
I'm trying to accomplish something like this
DocumentRoot /www/_offline.com
<VirtualHost *:80>
ServerName example1.com
ServerAlias www.example1.com
</VirtualHost>
<VirtualHost *:80>
ServerName example2.com
ServerAlias www.example2.com
DocumentRoot /www/_offline.com
</VirtualHost>
Is it possible to have ONE documentRoot for different domains?
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server localhost (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost localhost (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost aa.atd (/etc/apache2/sites-enabled/all-phoenix-domains:2)
port 80 namevhost atd.atd (/etc/apache2/sites-enabled/all-phoenix-domains:13)
port 80 namevhost test (/etc/apache2/sites-enabled/test:1)
Syntax OK