How to prevent Acquia Dev Desktop from overriding your custom Apache settings (vhost file)

How to prevent Acquia Dev Desktop from overriding your custom Apache settings (vhost file)

If you used Acquia Dev Desktop before, you may have noticed that the vhost.conf file is generated automatically every time Acquia Dev starts up. This means the Apache settings are fixed.

This makes it hard to add some custom config to the vhost.conf file. Luckily there is an easy workaround to avoid this problem.

  • Locate your httpd.conf file in. This file will be located at your_acquia_installation/apache/conf
  • Open the file and add locate the following line
    #NameVirtualHost * 
    Include conf/vhosts.conf
  • Include an extra host configuration file by adding
    Include conf/vhosts-custom.conf
  • Create the vhosts-custom.conf file at your_acquia_installation/apache/conf
  • Start adding your own lines in the newly created file
  • Restart Acquia Dev Desktop, this will load the new configuration