ServerName <%= @vhost %>
DocumentRoot <%= @install_dir %>/htdocs
# Permit larger file uploads
php_value upload_max_filesize 20M
# Must be at least as large as upload_max_filesize, plus a bit
# for the form metadata
php_value post_max_size 24M
/htdocs<%= @base_path %>">
AllowOverride None
Options +FollowSymLinks
Order Allow,Deny
Allow from All
<%- if @auth_type == 'ldap' -%>
AuthType Basic
AuthName "LDAP Auth"
AuthBasicProvider "ldap"
AuthLDAPUrl "ldap://<%= @ldap_servers.join(" ") %>:389/<%= @ldap_usertree %>?<%= @ldap_user_account_attr %>?<%= @ldap_user_scope %>"
Require valid-user
<%- end -%>
RewriteEngine on
RewriteBase /<%= @base_path %>
RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L]
RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L]
RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L]
RewriteRule ^$ doku.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) doku.php?id=$1 [QSA,L]
RewriteRule ^index.php$ doku.php
# Explicitly deny access to all code and configuration directories
/htdocs<%= @base_path %>/inc">
Order Deny,Allow
Deny from all
/htdocs<%= @base_path %>/inc/lang">
Order Deny,Allow
Deny from all
/htdocs<%= @base_path %>/lib/_fla">
## no access to the fla directory
Order allow,deny
Deny from all
Order Deny,Allow
Deny from all