I'm trying to have
running on a production webserver, and now I'm doing some basic tests in local machine before transfering the datas on the production webserver.
If possible I would like to use apache's virtual hosts and the /etc/hosts only.
I use apache's ServerAlias directive inside virtualHost like :
<VirtualHost *:80> DocumentRoot /path/to/mysite ServerName www.mysite.fr ServerAlias *.mysite.com <Directory /path/to/mysite> Options FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Then in /etc/hosts I put the domains I want :
127.0.0.1 www.mysite.com 127.0.0.1 test.mysite.com
When I test this in local, it works ! ( I can access either www.mysite.com and test.mysite.com ) When I test it in my remote webserver, it does just ignore my settings, and only the default www.mysite.com is available.
What am I missing ? Or my question should be, is it possible to have both urls (www and test) accessible on a webserver, using just virtual host and /etc/hosts file ?