Since Debian Jessie the default has changed to give included apache config files a '.conf' extension'.
Leveraging the IncludeOptional statement.

From /etc/apache/apache.conf:

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf


  1. Better match the defaults
  2. Consistency ... in the platform.d directory we already use the .conf extension
  3. No more apache syntax errors when you open one of those files with vim. (

As a transition we could add a check to the server verify process. If files without the .conf extension exists in the relevant directories then give a warning with an example delete command'

Members fund testing for the Drupal project. Drupal Association Learn more


helmo created an issue. See original summary.

helmo’s picture

first untested draft

helmo’s picture

Tested OK.

Just be sure to verify both the server and all sites after applying this.

Grimreaper’s picture

Status: Active » Needs review
Grimreaper’s picture


I confirm that the patch works. But previous vhost files (without .conf) are still present.

I think I found where the vhost config files are written:

Should it be there that we cleanup previous files?

helmo’s picture

The link you mention if for the drushrc file ... not the vhost config.

These three links are more related to the vhost file creation:

An alternative is that we add a note in releasenotes ... informing the user to clean these up.

The old files would be ignored by apache so the only risk here I can think of if someone who created some extra vhost files in Aegir's directories (sound like a bad idea anyway)

Grimreaper’s picture

Status: Needs review » Reviewed & tested by the community


Thanks @helmo for pointing the files, I didn't think that it was in those files that the check would have to go.

But as you have suggested, I think a manual step in the release note would be good so it does not introduce code to be removed later.

Changing to RTBC as the patch worked when I tested it.

helmo’s picture

Status: Reviewed & tested by the community » Needs review
2.83 KB

I worked a bit more on this to make it 'safe'.

This new patch only does things differently if a specific config option is set. This way an admin can decide when to convert.
Setting the option is documented in provision.api.php

To clean up the old config files I used:
find /var/aegir/config/server_master/apache/vhost.d/ | grep -v \\.conf | xargs rm -v

helmo’s picture

Version: 7.x-4.x-dev » 7.x-3.x-dev
Status: Needs review » Reviewed & tested by the community

Setting back to 3.x as it now applies there.

helmo’s picture

Status: Reviewed & tested by the community » Fixed


Note that this is only activated after you manually set an option ... see this comment.

  • helmo committed d597cfe on 7.x-3.x
    Issue #2759735 by helmo: Rename apache config files to .conf

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.