a***@gmail.com
2019-09-05 10:24:40 UTC
I have a local server running (apache) such that home.test points to /www. I have a vhost pointing to /www/sites with the url sites.test. This works fine. Any folder inside /www/sites/ has the url xxx.sites.test. Now I want to add /www/dev such that any sub folders are linked to xxx.dev.test
<Directory "www/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Virtualhost *:80>
DocumentRoot "www/home/"
ServerName home.test
</Virtualhost>
<Virtualhost *:80>
VirtualDocumentRoot "www/sites/%1/_site/"
ServerName sites.test
ServerAlias *.test
</Virtualhost>
<Virtualhost *:80>
VirtualDocumentRoot "www/dev/%1/_site"
ServerName dev.test
ServerAlias *.test
</Virtualhost>
Im getting something wrong here, I would expect the above https-vhost.conf to link /www/dev/xxx to xxx.dev.test but only home.test and xxx.sites.test work.
apachectl -D DUMP_VHOSTS shows ALL three vhosts... Im so confused!
<Directory "www/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Virtualhost *:80>
DocumentRoot "www/home/"
ServerName home.test
</Virtualhost>
<Virtualhost *:80>
VirtualDocumentRoot "www/sites/%1/_site/"
ServerName sites.test
ServerAlias *.test
</Virtualhost>
<Virtualhost *:80>
VirtualDocumentRoot "www/dev/%1/_site"
ServerName dev.test
ServerAlias *.test
</Virtualhost>
Im getting something wrong here, I would expect the above https-vhost.conf to link /www/dev/xxx to xxx.dev.test but only home.test and xxx.sites.test work.
apachectl -D DUMP_VHOSTS shows ALL three vhosts... Im so confused!