I'm new with apache2 and virtualHosts and all these things, I'm trying to set multiple subdomains, each in one file.
For example, I'll have
quentin-dommerc.com file in site-available :
DocumentRoot /var/www/
ServerName quentin-dommerc.com
and en.quentin-dommerc.com file in site-available :
DocumentRoot /var/www/en/
ServerName en.quentin-dommerc.com
But whatever the subdomain I go to, I'm always on quentin-dommerc.com :(
Note that I've a2ensite my files and they're well in site-enabled. I've also reloaded/restarted apache2. My CNAME are also set.
Answer
Try changing your VirtualHost entries to use your ip address instead of domain name. e.g. if you ip address is 1.1.1.1
DocumentRoot /var/www/
ServerName quentin-dommerc.com
DocumentRoot /var/www/en/
ServerName en.quentin-dommerc.com
You may also have to update your Listen lines to reflect using the ip address.
No comments:
Post a Comment