August 2017
Intermediate to advanced
278 pages
8h 53m
English
The basic NGINX configuration for MediaWiki is very similar to many other PHP platforms. It has a flat directory structure which easily runs with basic system resources.
Here's the configuration:
server {
listen 80;
server_name mediawiki.nginxcookbook.com;
access_log /var/log/nginx/mediawiki.access.log combined;
index index.php;
root /var/www/html/;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
The default installation doesn't use any rewrite rules, which means you'll get URLs such as index.php?title=Main_Page instead of the neater (and ...
Read now
Unlock full access