I'm using Apache 2.2 and let it serve domains foo.example.com and bar.example.com with <VirtualHost>
statements:
<VirtualHost 127.0.0.1:80>
ServerName foo.example.com
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerName bar.example.com
</VirtualHost>
My problem is, that I need to add configuration options, that are only targeted at foo.example.com
, in a separate file (let's say, /etc/apache/sites-enabled/foo.conf
). This file will be included, before the VirtualHost statement is issued, but it can't be embedded inside it.
Can I (and if yes, how) target configuration settings to foo.example.com
requests only, outside the VirtualHost container?