-
Notifications
You must be signed in to change notification settings - Fork 1
/
mediawiki.conf
52 lines (39 loc) · 1017 Bytes
/
mediawiki.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
server {
server_name wiki.olegs.dev;
root /var/www/wiki;
access_log /var/log/nginx/wiki-access.log;
error_log /var/log/nginx/wiki-error.log;
client_max_body_size 5m;
client_body_timeout 60;
location / {
try_files $uri @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?title=$1&$args;
}
location ^~ /maintenance/ {
return 403;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
try_files $uri /index.php;
expires max;
log_not_found off;
}
location = /_.gif {
expires max;
empty_gif;
}
location ^~ /cache/ {
deny all;
}
location /dumps {
root /var/www/wiki/local;
autoindex on;
}
}
# https://www.nginx.com/resources/wiki/start/topics/recipes/mediawiki/