-
Notifications
You must be signed in to change notification settings - Fork 2
/
deki-apache.conf
81 lines (70 loc) · 3.06 KB
/
deki-apache.conf
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<VirtualHost *:80>
ServerName www.example.com
#ServerAlias
ErrorLog /var/log/httpd/error-dekiwiki.log
CustomLog /var/log/httpd/access-dekiwiki.log common
DocumentRoot "/var/www/dekiwiki"
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /index.php?title= [L,QSA,NE]
RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|deki)/
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !^/favicon\.ico$
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{REQUEST_URI} !^/error/(.*)\.var$
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
# Bug: 5252 https rewrite/proxy rules
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} ^/@api/
RewriteCond %{QUERY_STRING} !^(.*)dream.in.scheme= [NC]
RewriteRule ^/@api/(.*)$ http://localhost:8081/$1?dream.in.scheme=https [QSA,P,L]
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} ^/@api/
RewriteCond %{QUERY_STRING} ^(.*)dream.in.scheme= [NC]
RewriteRule ^/@api/(.*)$ http://localhost:8081/$1 [QSA,P,L]
# End Bug: 5252
# deki-api uses encoded slashes in query parameters so AllowEncodedSlashes must be On
AllowEncodedSlashes On
# FIXME:
# Some php flags we need. These are only needed until all
# the short php open tags are changed to long in the source code.
php_flag short_open_tag on
# Allow short open tags and turn off E_NOTICE messages
php_value error_reporting "E_ALL & ~E_NOTICE"
# Setting php memory parameters
# php_value memory_limit "128M"
# php_value post_max_size "64M"
# php_value upload_max_filesize "64M"
# mod_proxy rules
ProxyPass /@api http://localhost:8081 retry=1
ProxyPassReverse /@api http://localhost:8081
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
</Proxy>
</VirtualHost>
<Directory "/var/www/dekiwiki">
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.2/mod/core.html#options
# for more information.
Options None
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride All
# Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>