summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_joomla/partial.erb
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
committerMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
commit0e7099174fdef951c81880b51e23342fcde86374 (patch)
tree28e99fd804674e3ac025a73a061c73f0ce6d7870 /templates/vhosts/php_joomla/partial.erb
parent3ac4d6249f50627c0827ce3812eb21d5b89ed974 (diff)
parentbf36ba5e988a7bb3f163ed0575020ef714519edc (diff)
Merge remote-tracking branch 'shared/master' into riseup
Conflicts: README
Diffstat (limited to 'templates/vhosts/php_joomla/partial.erb')
-rw-r--r--templates/vhosts/php_joomla/partial.erb32
1 files changed, 32 insertions, 0 deletions
diff --git a/templates/vhosts/php_joomla/partial.erb b/templates/vhosts/php_joomla/partial.erb
new file mode 100644
index 0000000..3046129
--- /dev/null
+++ b/templates/vhosts/php_joomla/partial.erb
@@ -0,0 +1,32 @@
+ <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>
+