summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_joomla/partial.erb
blob: 55445bfc690561ba23ebb502e2ea5b01a531c7ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  <Directory "<%= @documentroot %>/">
<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %> 
<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>

    Include include.d/joomla.inc
  </Directory>

  <Directory "<%= @documentroot %>/administrator/">
    RewriteEngine on

    # Rewrite URLs to https that go for the admin area
    RewriteCond %{REMOTE_ADDR} !^127\.[0-9]+\.[0-9]+\.[0-9]+$
    RewriteCond %{HTTPS} !=on
    RewriteCond %{REQUEST_URI} (.*/administrator/.*)
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
  </Directory>

  # Deny various directories that
  # shouldn't be webaccessible
  <Directory "<%= @documentroot %>/tmp/">
    Deny From All
  </Directory>
  <Directory "<%= @documentroot %>/logs/">
    Deny From All
  </Directory>
  <Directory "<%= @documentroot %>/cli/">
    Deny From All
  </Directory>