Empty docroot and custom domains


I would like to use devilbox for the development of mutliple projects. All projects are different, one is Symfony, another one is home made and again some others are existings CMS systems. So every project has its own HTTP_DOCROOT_DIR.

Also I want to be able to control the domain name and not use the domainname just based on the folder name. Why? A lot of the folders already hold the TLD in the folder, meaning I get domainnames like domainname.com.loc.

I’m using Apache24 and tried te following:

.env (devilbox)


# Emtpy docroot so it can be fully controlled by vhost

project folder .devilbox/apache24.yaml

vhost: |
  <VirtualHost __DEFAULT_VHOST__:__PORT__>
      ServerName __VHOST_NAME__
      ServerAlias www.customdomain.test
      Protocols  __HTTP_PROTO__

      CustomLog  "__ACCESS_LOG__" combined
      ErrorLog   "__ERROR_LOG__"

      # Custom directives

  # Normal vHost (-p)
  docroot: |
    # Define the vhost to serve files
    DocumentRoot "/shared/httpd/mycustomdomain.com"
    <Directory "/shared/httpd/mycustomdomain.com">
        DirectoryIndex __INDEX__

        AllowOverride All
        Options All

        RewriteEngine on
        RewriteBase /

        Order allow,deny
        Allow from all
        Require all granted

Running this and going to www.customdomain.test will show me the default devilbox page (like if you visit

I can’t get the VHOST working properly.

I also don’t know how to use the variables __VHOST_NAME__, __DOCUMENT_ROOT__ properly, where is (or should) the conf.yml file be located?