Commit 2ea9d2b6 authored by anarcat's avatar anarcat Committed by anarcat

new hook: provision_vhost_config, to add stuff to the apache config file for a...

new hook: provision_vhost_config, to add stuff to the apache config file for a given site, in the vhost context
backported from d5
parent 08985285
......@@ -190,6 +190,12 @@ function _provision_apache_create_vhost_config($url, $data, $template = NULL) {
$writable = provision_path("writable", PROVISION_VHOST_PATH, TRUE , NULL,
t("Virtual host configuration path @path is not writable."),
PROVISION_PERM_ERROR | PROVISION_FRAMEWORK_ERROR);
$data['extra_config'] = "# Extra configuration from modules:\n";
foreach (module_implements('provision_vhost_config') as $module) {
$data['extra_config'] .= "# -- $module settings --\n";
$data['extra_config'] .= module_invoke($module, 'provision_vhost_config', $url, $data) . "\n";
}
if ($writable) {
$file = fopen(PROVISION_VHOST_PATH .'/'. $url, "w");
$text = provision_render_config($template, $data);
......
......@@ -13,6 +13,8 @@
endforeach;
endif; ?>
<?php print $extra_config; ?>
# Error handler for Drupal > 4.6.7
<Directory "<?php print $publish_path; ?>/sites/<?php print trim($site_url, '/'); ?>/files">
SetHandler This_is_a_Drupal_security_line_do_not_remove
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment