I'm trying to set up mediawiki and I keep getting a 500 internal server error.
/var/log/nginx/error.log is empty. PHP errors are logged there, but I don't see any errors relating to mediawiki.
I've tried setting display_errors and display_startup_errors to on in php.ini, but that hasn't helped.
I thought it could be a file permissions thing, but the entire of /wiki is set to 755 and owned by www-data:www-data.
I've also followed this: https://www.mediawiki.org/wiki/Manual:How_to_debug and included the relevant lines in /wiki/index.php and /wiki/LocalSettings.php but the error log still remains empty.
This is my nginx config:
server_tokens off;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
server {
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/certs/cert.pem;
ssl_certificate_key /etc/letsencrypt/certs/privkey.pem;
root /var/www/html;
index index.php;
server_name example.com;
error_page 404 /404.html;
error_page 500 /500.html;
location = /wiki {
return 301 /wiki/;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_intercept_errors on;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
How do I fix this? I can't figure out exactly what's wrong if there's nothing in the error log.