RedirectMatch 301 ^/api\.php$ /w/api.php
RedirectMatch 301 ^/opensearch_desc\.php$ /w/opensearch_desc.php
- Alias /wiki <%= @mediawiki[:directory] %>/index.php
+ Alias /wiki <%= @directory %>/w/index.php
#Support /pagename -> /wiki/pagename
RewriteEngine on
<Directory <%= @directory %>>
Options -Indexes
+ Require all granted
</Directory>
- <Directory <%= @mediawiki[:directory] %>/images/>
+ <Directory <%= @directory %>/w/images/>
# No php execution in the upload area
php_admin_flag engine off
Options -ExecCGI -Includes -Indexes
AllowOverride None
+ AddType text/plain .html .htm .shtml
+<% if @private -%>
+ Require all denied
+<% end -%>
</Directory>
- <Directory <%= @mediawiki[:directory] %>/images/thumb/>
+ <Directory <%= @directory %>/w/images/thumb/>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
</Directory>
- <Directory <%= @mediawiki[:directory] %>/maintenance/>
- Order allow,deny
- Deny from all
+ <Directory <%= @directory %>/w/maintenance/>
+ Require all denied
</Directory>
- <Files <%= @mediawiki[:directory] %>/LocalSettings.php>
- Order allow,deny
- Deny from all
+ <Files <%= @directory %>/w/LocalSettings.php>
+ Require all denied
</Files>
- <Directory <%= @mediawiki[:directory] %>/images/>
- Options -ExecCGI -Includes -Indexes
- AllowOverride None
- AddType text/plain .html .htm .shtml
- php_admin_flag engine off
- </Directory>
-
- <Directory <%= @mediawiki[:directory] %>/cache/>
+ <Directory <%= @directory %>/w/cache/>
Options -ExecCGI -Includes -Indexes
AllowOverride None
AddType text/plain .html .htm .shtml
</Directory>
<Directory ~ "\.svn">
- Order allow,deny
- Deny from all
+ Require all denied
</Directory>
<Directory ~ "\.git">
- Order allow,deny
- Deny from all
+ Require all denied
</Directory>
<Files ~ "~$">
- Order allow,deny
- Deny from all
+ Require all denied
</Files>
</VirtualHost>
-<% if @mediawiki[:enable_ssl] -%>
+<% if @ssl_enabled -%>
<VirtualHost *:443>
ServerName <%= @name %>
<% @aliases.each do |alias_name| -%>
RedirectMatch 301 ^/api\.php$ /w/api.php
RedirectMatch 301 ^/opensearch_desc\.php$ /w/opensearch_desc.php
- Alias /wiki <%= @mediawiki[:directory] %>/index.php
+ Alias /wiki <%= @directory %>/w/index.php
#Support /pagename -> /wiki/pagename
RewriteEngine on
<Directory <%= @directory %>>
Options -Indexes
+ Require all granted
</Directory>
- <Directory <%= @mediawiki[:directory] %>/images/>
+ <Directory <%= @directory %>/w/images/>
# No php execution in the upload area
php_admin_flag engine off
Options -ExecCGI -Includes -Indexes
AllowOverride None
+<% if @private -%>
+ Require all denied
+<% end -%>
</Directory>
- <Directory <%= @mediawiki[:directory] %>/images/thumb/>
+ <Directory <%= @directory %>/w/images/thumb/>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
</Directory>
- <Directory <%= @mediawiki[:directory] %>/maintenance/>
- Order allow,deny
- Deny from all
+ <Directory <%= @directory %>/w/maintenance/>
+ Require all denied
</Directory>
- <Files <%= @mediawiki[:directory] %>/LocalSettings.php>
- Order allow,deny
- Deny from all
+ <Files <%= @directory %>/w/LocalSettings.php>
+ Require all denied
</Files>
- <Directory <%= @mediawiki[:directory] %>/images/>
+ <Directory <%= @directory %>/w/images/>
Options -ExecCGI -Includes -Indexes
AllowOverride None
AddType text/plain .html .htm .shtml
php_admin_flag engine off
</Directory>
- <Directory <%= @mediawiki[:directory] %>/cache/>
+ <Directory <%= @directory %>/w/cache/>
Options -ExecCGI -Includes -Indexes
AllowOverride None
AddType text/plain .html .htm .shtml
</Directory>
<Directory ~ "\.svn">
- Order allow,deny
- Deny from all
+ Require all denied
</Directory>
<Directory ~ "\.git">
- Order allow,deny
- Deny from all
+ Require all denied
</Directory>
<Files ~ "~$">
- Order allow,deny
- Deny from all
+ Require all denied
</Files>
</VirtualHost>
<% end -%>