subdir.tpl.php 1.6 KB
Newer Older
1 2 3 4 5 6 7 8
<?php
$aegir_root = drush_get_option('aegir_root');
if (!$aegir_root && $server->aegir_root) {
  $aegir_root = $server->aegir_root;
}
?>

Alias /<?php print $subdir; ?>/.well-known/acme-challenge <?php print $aegir_root; ?>/tools/le/.acme-challenges
9
Alias /<?php print $subdir; ?> <?php print $this->root; ?>
10

11
<Location /<?php print $subdir; ?>>
12 13 14 15 16 17 18 19 20 21 22 23 24

  SetEnv db_type  <?php print urlencode($db_type); ?>

  SetEnv db_name  <?php print urlencode($db_name); ?>

  SetEnv db_user  <?php print urlencode($db_user); ?>

  SetEnv db_passwd  <?php print urlencode($db_passwd); ?>

  SetEnv db_host  <?php print urlencode($db_host); ?>

  SetEnv db_port  <?php print urlencode($db_port); ?>

25 26 27
  <IfModule mod_rewrite.c>
  RewriteEngine on

28 29 30
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
anarcat's avatar
anarcat committed
31
  RewriteRule ^<?php print $this->root; ?>/(.*)$ /<?php print $subdir; ?>/index.php?q=$1 [L,QSA]
32
  </IfModule>
33 34 35
</Location>

# Error handler for Drupal > 4.6.7
36
<Directory ~ "sites/.*/files">
37 38 39 40 41 42
  SetHandler This_is_a_Drupal_security_line_do_not_remove
</Directory>

# Prevent direct reading of files in the private dir.
# This is for Drupal7 compatibility, which would normally drop
# a .htaccess in those directories, but we explicitly ignore those
anarcat's avatar
anarcat committed
43
<Directory "<?php print $this->site_path; ?>/private/" >
44 45 46 47 48
   SetHandler This_is_a_Drupal_security_line_do_not_remove
   Deny from all
   Options None
   Options +FollowSymLinks
</Directory>
49 50 51 52 53

# Allow access to hosting_le challenges directory.
<Directory "<?php print $aegir_root; ?>/tools/le/.acme-challenges">
  Require all granted
</Directory>