Answer the question
In order to leave comments, you need to log in
Nginx, php-fpm, mediawiki 404 error when opening files, how to fix?
Hello!
Short link does not work https://site.ru/wiki/File:Ab78.png
This is how it works https://site.ru/m/index.php5?title=File:Ab78.png
Settings:
location /m/ {
index index.php5;
location ~ \.php5?$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php5;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "mbstring.func_overload = 0";
}
}
location /wiki {
index index.php5;
rewrite "^(wiki)$" $1/ permanent;
rewrite "^/wiki/([^?]*)(?:\?(.*))?" /m/index.php5?title=$1&$args last;
}
$wgScriptPath = "/m";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
$wgScriptExtension = ".php5";
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question