Search code examples
linuxapache2manjaro

Split httpd-vhosts.conf into multiple virtual host files


I have experience setting up virtual hosts with Apache2 on Ubuntu, but recently I started using Manjaro, when I tried to set up multiple virtual hosts I had to put the configuration into the httpd-vhosts.conf file.

I have 30 + virtual hosts configured so having this all in one file doesn't seem very clear. How would I split this up into multiple files and get Apache2 to read them all?


Solution

  • You can find info about this on the Arch wiki. You can make to folder yourself and add the config files to the httpd.conf using Include <confFile>

    https://wiki.archlinux.org/index.php/Apache_HTTP_Server#Managing_many_virtual_hosts