mediawiki/public_mediawiki/public_mediawiki.conf
2025-02-04 20:21:07 +01:00

45 lines
1.1 KiB
Text

# Public Chaostreff MediaWiki
server {
listen 80;
listen [::]:80;
root /var/lib/public_mediawiki;
charset utf-8;
client_max_body_size 100m;
client_body_timeout 60;
index index.php index.html index.htm;
location ~ \.ht {
deny all;
}
location /robots.txt {
root /etc/nginx;
try_files /robots.txt =404;
}
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php;
}
location ^~ /maintenance/ {
return 403;
}
# Restrictions based on the .htaccess files
location ~ ^/(cache|includes|maintenance|languages|serialized|tests|images/deleted)/ {
deny all;
}
location ~ \.php$ {
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_index index.php;
try_files $uri @rewrite;
}
}