Closed (fixed)
Project:
Provision
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 Feb 2010 at 03:58 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
adrian commentedwe already have a hook for this
Comment #2
anarcat commentedWell, this is different: the hook allows *templates* to be added, as opposed to adding stuff to within the block. This could make the redirection code a lot cleaner for example:
Comment #3
benkant commentedYep, this patch is to allow you to add to the template file, outside of the existing VirtualHost block.
Comment #4
simeWith this feature you'd have two separate methods to add to a vhost file.
I had a desire earlier today to be able to replace * with an IP. That's a third that AFAICT is not covered by this.
Is there a place for drupal_alter on a whole vhost contents?
Comment #5
benkant commentedPerhaps being able to alter the whole vhost contents would take care of all possible issues that might arise with this config file.
Comment #6
simeI feel that too benkant. If that was in place then we could solve unusual setups with 3rd party addons (or roll your own).
Comment #7
Anonymous (not verified) commentedCould we please have a new patch rolled against the latest in git master branch (multiserver got merged in and everything is different in provision now)
Thanks!
Comment #8
benkant commentedStay tuned I will roll a new patch when I'm back at work Monday.
Comment #9
benkant commentedWe're not on HEAD anymore and are using releases. Any chance someone else can reroll this?
Comment #10
adrian commentedhead is now completely completely different.
just so you know.
Comment #11
adrian commentedok.
we can't alter the contents of the vhost, because we dont actually have a full representation of it.
we would need to write a parser for virtualhost files and then rewrite it for each of the additional web servers.
Another thing, is that with additional web servers being added , there's a high likelihood that your code will either break or best case scenario be completely ignored with other services.
i'm looking at what i can do in the config classes though.
Comment #12
Anonymous (not verified) commentedThe current API for provision_apache_vhost_config (and the platform and server ones) allow you to return a path to a .tpl.php rather than just raw data to be injected.
I don't know if that is enough to consider this fixed or not yet. I really find the case of 'i can't inject into a vhost and need to add a whole 'nother vhost or manage the whole thing' to be somewhat of a corner case, except maybe the case of alias redirection where the second vhost is made up of the first Alias.
If it needs to be outside of the vhost, it can go in the platform or server wide vhosts, for which there are similar APIs for now.
Comment #13
steven jones commentedComment #14
steven jones commentedWe should probably let people who want to swap out the Aegir template files with their own easily, which afaik we don't at the moment. I think this would be the only way to cover the corner cases we have now.
Comment #15
steven jones commentedHere's a simple version. I think that we need to make it easier to make sure templates can be suggested in a specific order and we need a specific way of picking one of the suggestions.
Comment #16
anarcat commentedComment #17
steven jones commentedThis should have an alter hook, not just the invoke.
Comment #18
steven jones commentedAdded the alter hook and pushed in 6.x-2.x