I can't seem to explain Apache to accept requests on the naked domain but to ignore anything coming from a subdomain. I have the feeling this should be easy but everything I find is related to redirecting subdomain requests, not ignoring them.
My current setup:
<VirtualHost *:80> ServerName example.com DocumentRoot /var/www/example </VirtualHost>
something.example.com directs to
example.com, I would like it to fail with a
404 not found. I can probably exclude everything with
mode_rewrite but is that the best solution? Or should I do this on the DNS level?
Thank you for helping me out with such a n00b question.