Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.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
Benefits:
- Better match the defaults
- Consistency ... in the platform.d directory we already use the .conf extension
- 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'
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | rename_apache_config-2759735-8.patch | 2.83 KB | helmo |
| #2 | rename_apache_config-2759735-2.patch | 1.48 KB | helmo |











Comments
Comment #2
helmo CreditAttribution: helmo at Initfour websolutions commentedfirst untested draft
Comment #3
helmo CreditAttribution: helmo at Initfour websolutions commentedTested OK.
Just be sure to verify both the server and all sites after applying this.
Comment #4
GrimreaperComment #5
GrimreaperHello,
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: http://cgit.drupalcode.org/provision/tree/provision.inc#n186
Should it be there that we cleanup previous files?
Comment #6
helmo CreditAttribution: helmo at Initfour websolutions commentedThe link you mention if for the drushrc file ... not the vhost config.
These three links are more related to the vhost file creation:
http://cgit.drupalcode.org/provision/tree/http/Provision/Service/http.ph...
http://cgit.drupalcode.org/provision/tree/http/Provision/Service/http/ap...
http://cgit.drupalcode.org/provision/tree/Provision/Service.php#n97
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)
Comment #7
GrimreaperHello,
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.
Comment #8
helmo CreditAttribution: helmo at Initfour websolutions commentedI 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 -vComment #9
helmo CreditAttribution: helmo at Initfour websolutions commentedSetting back to 3.x as it now applies there.
Comment #10
helmo CreditAttribution: helmo at Initfour websolutions commentedCommitted.
Note that this is only activated after you manually set an option ... see this comment.