55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
<VirtualHost *:80>
|
|
|
|
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
|
|
|
|
<Directory "<%= @install_dir %>/htdocs<%= @base_path %>">
|
|
AllowOverride None
|
|
Options +FollowSymLinks
|
|
Require all granted
|
|
|
|
<%- if @auth_type == 'authldap' && @use_sso -%>
|
|
AuthType Basic
|
|
AuthName "LDAP Auth"
|
|
AuthBasicProvider "ldap"
|
|
AuthLDAPUrl "ldap://<%= @ldap_servers.join(" ") %>:389/<%= @ldap_user_tree %>?<%= @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
|
|
</Directory>
|
|
|
|
# Explicitly deny access to all code and configuration directories
|
|
<Directory "<%= @install_dir %>/htdocs<%= @base_path %>/inc">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
<Directory "<%= @install_dir %>/htdocs<%= @base_path %>/inc/lang">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
<Directory "<%= @install_dir %>/htdocs<%= @base_path %>/lib/_fla">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
<Directory /etc/dokuwiki>
|
|
Require all denied
|
|
</Directory>
|
|
|
|
</VirtualHost>
|