Solved Moving web server to FreeBSD - MediaWiki shows blank page

jbo@

Developer
Hello folks,

The past couple of weeks I spend converting from being a Linux guy to becoming a FreeBSD guy. After I've had a really nice time with FreeBSD I felt that it's finally time to stop playing around and moving one of my web servers from an Ubuntu server to a FreeBSD server.
I setup Nginx 1.8.0, PHP-FPM 5.6 and MySQL 14.14. Getting the first few static HTML pages working was no problem at all and just a matter of minutes. Then I wanted to migrate a MediaWiki but I didn't succeed so far. No matter what I try all I end up with is a blank page when navigating to the corresponding URL.
I'm out of ideas and I really need your help, guys.

As already mentioned serving static HTML pages is no problem. Furthermore I verified that PHP is working correctly by creating a new virtual host and an index.php that just executes phpinfo(). That works as expected too. But the virtual host for the mediawiki just returns a blank page (but it succeeds to supply the favicon, interestingly).

Here's my /usr/local/etc/nginx/nginx.conf:
Code:
user www;
worker_processes 2;


error_log  /var/log/nginx.error.log  info;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    access_log  /var/log/nginx.access.log;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    # GZIP compression
    gzip on;
    gzip_comp_level 5;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_disable "msie6";
    gzip_types
        text/plain
        text/css
        text/xml
        text/javascript
        application/xml
        application/javascript
        application/x-javascript;


    # Include virtual hosts
    include /usr/local/etc/nginx/vhosts/*;
}

And here's the server{} section for the virtual host serving the MediaWiki /usr/local/etc/nginx/vhosts/wiki.ugfx.org:
Code:
server {
    server_name wiki2.ugfx.org;
    root /usr/local/www/wiki.ugfx.org;
    index index.php;

    client_max_body_size 5m;
    client_body_timeout 60;

    location / {
        try_files $uri $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-fpm.sock;
    }

    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 /usr/local/www/wiki.ugfx.org/local;
        autoindex on;
    }
}

Any thoughts on this? Did I miss something obvious?
I verified that permissions are set correctly. /usr/local/www/wiki.ugfx.org belongs to the user www and the group www. That was set recursively. After I got really desperate I even set permissions to 777 (recursively) but nothing changed.

The Nginx error log file (/var/log/nginx.error.log) shows some weird message I've never seen before. Not sure how to interpret that:
Code:
280 2016/01/30 18:43:07 [notice] 6372#0: signal 15 (SIGTERM) received, exiting
281 2016/01/30 18:43:07 [notice] 6373#0: exiting
282 2016/01/30 18:43:07 [notice] 6374#0: exiting
283 2016/01/30 18:43:07 [notice] 6373#0: exit
284 2016/01/30 18:43:07 [notice] 6374#0: exit
285 2016/01/30 18:43:07 [notice] 6372#0: signal 20 (SIGCHLD) received
286 2016/01/30 18:43:07 [notice] 6372#0: worker process 6374 exited with code 0
287 2016/01/30 18:43:07 [notice] 6372#0: signal 23 (SIGIO) received
288 2016/01/30 18:43:07 [notice] 6372#0: signal 23 (SIGIO) received
289 2016/01/30 18:43:07 [notice] 6372#0: signal 20 (SIGCHLD) received
290 2016/01/30 18:43:07 [notice] 6372#0: worker process 6373 exited with code 0
291 2016/01/30 18:43:07 [notice] 6372#0: exit
292 2016/01/30 18:43:07 [notice] 7234#0: using the "kqueue" event method
293 2016/01/30 18:43:07 [notice] 7234#0: nginx/1.8.0
294 2016/01/30 18:43:07 [notice] 7234#0: OS: FreeBSD 10.2-RELEASE-p9
295 2016/01/30 18:43:07 [notice] 7234#0: kern.osreldate: 1002000, built on 1001000
296 2016/01/30 18:43:07 [notice] 7234#0: hw.ncpu: 2
297 2016/01/30 18:43:07 [notice] 7234#0: net.inet.tcp.sendspace: 32768
298 2016/01/30 18:43:07 [notice] 7234#0: kern.ipc.somaxconn: 128
299 2016/01/30 18:43:07 [notice] 7234#0: getrlimit(RLIMIT_NOFILE): 58284:58284
300 2016/01/30 18:43:07 [notice] 7235#0: start worker processes
301 2016/01/30 18:43:07 [notice] 7235#0: start worker process 7236
302 2016/01/30 18:43:07 [notice] 7235#0: start worker process 7237
303 2016/01/30 18:43:07 [notice] 7235#0: signal 23 (SIGIO) received
304 2016/01/30 18:43:29 [info] 7237#0: *4 client closed connection while waiting for request, client: xx.xx.xx.xx, server: 0.0.0.0:80
305 2016/01/30 18:53:31 [info] 7237#0: *10 kevent() reported that client 218.55.21.53 closed keepalive connection (54: Connection reset by peer)
306 2016/01/30 18:56:37 [info] 7237#0: *14 client closed connection while waiting for request, client: xx.xx.xx.xx, server: 0.0.0.0:80
307 2016/01/30 18:56:57 [info] 7237#0: *16 client closed connection while waiting for request, client: xx.xx.xx.xx, server: 0.0.0.0:80
308 2016/01/30 18:57:33 [notice] 7237#0: signal 15 (SIGTERM) received, exiting
309 2016/01/30 18:57:33 [info] 7237#0: kevent() failed (4: Interrupted system call)
310 2016/01/30 18:57:33 [notice] 7237#0: exiting
311 2016/01/30 18:57:33 [notice] 7236#0: signal 15 (SIGTERM) received, exiting
312 2016/01/30 18:57:33 [info] 7236#0: kevent() failed (4: Interrupted system call)
313 2016/01/30 18:57:33 [notice] 7236#0: exiting
314 2016/01/30 18:57:33 [notice] 7235#0: signal 15 (SIGTERM) received, exiting
315 2016/01/30 18:57:33 [notice] 7237#0: exit
316 2016/01/30 18:57:33 [notice] 7236#0: exit
317 2016/01/30 18:57:33 [notice] 7235#0: signal 20 (SIGCHLD) received
318 2016/01/30 18:57:33 [notice] 7235#0: worker process 7237 exited with code 0
319 2016/01/30 18:57:33 [notice] 7235#0: worker process 7236 exited with code 0
320 2016/01/30 18:57:33 [notice] 7235#0: exit
321 2016/01/30 18:58:18 [notice] 647#0: using the "kqueue" event method
322 2016/01/30 18:58:18 [notice] 647#0: nginx/1.8.0
323 2016/01/30 18:58:18 [notice] 647#0: OS: FreeBSD 10.2-RELEASE-p9
324 2016/01/30 18:58:18 [notice] 647#0: kern.osreldate: 1002000, built on 1001000
325 2016/01/30 18:58:18 [notice] 647#0: hw.ncpu: 2
326 2016/01/30 18:58:18 [notice] 647#0: net.inet.tcp.sendspace: 32768
327 2016/01/30 18:58:18 [notice] 647#0: kern.ipc.somaxconn: 128
328 2016/01/30 18:58:18 [notice] 647#0: getrlimit(RLIMIT_NOFILE): 58284:58284
329 2016/01/30 18:58:18 [notice] 648#0: start worker processes
330 2016/01/30 18:58:18 [notice] 648#0: start worker process 652
331 2016/01/30 18:58:18 [notice] 648#0: start worker process 653
332 2016/01/30 18:58:18 [notice] 648#0: signal 23 (SIGIO) received

I made sure that both the user and the group in the php-fpm.conf were set to www.

Any other comments are of course also welcomed. I am still learning :)
 
Chances are you're missing a PHP-module that's wanted by MediaWiki. Setting $wgShowExceptionDetails = true; in LocalSettings.php and refreshing the page should give you an idea as to which one.
 
Thank you for your reply. I added the setting you mentioned to the very bottom of LocalSettings.php but the blank page remained. I followed the advice in the [URL='https://www.mediawiki.org/wiki/Manual:How_to_debug/de']MediaWiki documentation[/URL] and forced the PHP debugging output to be one and I restarted all services (and even rebooted) but the blank page remains.
Code:
$wgShowExceptionDetails = true;
error_reporting( -1 );
ini_set( 'display_errors', 1 );

In the mean time I tried to setup a new MediaWiki installation but when I navigate to the installation folder (to complete the installation using the web interface) I get a blank page...
Any ideas? There's nothing in the PHP-FPM log (/var/log/php-fpm.log) and Nginx shows similar messages as before:
Code:
2016/01/31 09:14:11 [info] 950#0: *25 client closed connection while waiting for request, client: xx.xx.xx.xx, server: 0.0.0.0:80
 
I tried to figure out which modules MediaWiki requires but I couldn't find anything but a note that stated that all required PHP modules are part of the standard installation.
Code:
root@medusa:~ # php -m
[PHP Modules]
Core
date
ereg
libxml
mysql
mysqlnd
pcre
Reflection
SPL
standard

[Zend Modules]

Code:
root@medusa:~ # php-fpm -m
[PHP Modules]
cgi-fcgi
Core
date
ereg
libxml
mysql
mysqlnd
pcre
Reflection
SPL
standard

[Zend Modules]

Caching is disabled in LocalSettings.php: $wgMainCacheType = CACHE_NONE;
 
I installed all dependencies that came with www/mediawiki126 (without actually installing the MediaWiki package itself. It pulled quite a lot more php modules than the ones listed in the MediaWiki documentation. However, still no luck. Blank page, only the favicon loads.
I checked the logs, nothing new.
Being very desperate I deliberately set wrong MySQL settings in hopes to get an error message - still nothing.

Static HTML pages and a PHP file calling phpinfo() still work as expected.

I just tried to access a file that doesn't exist (eg. http://wiki2.ugfx.org/foo.html) and I get a blank page there too. No 404 error. I really suspect that something is wrong in the Nginx configuration posted in my first post.
 
Try this for a first diagnosis:
Code:
# sockstat -l | grep 'nginx|php'
www      nginx      885   6  tcp4   xxx.xxx.xxx.xxx:80       *:*
root     nginx      884   6  tcp4   xxx.xxx.xxx.xxx:80       *:*
www      php-fpm    880   0  tcp4   xxx.xxx.xxx.xxx:9000     *:*
www      php-fpm    879   0  tcp4   xxx.xxx.xxx.xxx:9000     *:*
root     php-fpm    878   10 tcp4   xxx.xxx.xxx.xxx:9000     *:*
This numbers should somewhere show up like this:
Code:
# grep -R ' xxx.xxx.xxx.xxx:(9000|80)' /usr/local/etc
/usr/local/etc/php-fpm.conf:listen = xxx.xxx.xxx.xxx:9000
/usr/local/etc/nginx/nginx.conf:    listen       xxx.xxx.xxx.xxx:80;
/usr/local/etc/nginx/nginx.conf:      fastcgi_pass    xxx.xxx.xxx.xxx:9000;
Now reduce your nginx.conf to an absolute functioning minimum so you get a first access with your browser. Then adding step by step more lines there.
 
This looks sane to me:
Code:
root@medusa ~# sockstat -l | grep 'nginx'
www      nginx      942   6  tcp4   *:80                  *:*
www      nginx      942   7  tcp6   *:80                  *:*
www      nginx      941   6  tcp4   *:80                  *:*
www      nginx      941   7  tcp6   *:80                  *:*
root     nginx      940   6  tcp4   *:80                  *:*
root     nginx      940   7  tcp6   *:80                  *:*
Code:
root@medusa ~# sockstat -l | grep 'php'
www      php-fpm    636   0  stream /var/run/php-fpm.sock
www      php-fpm    635   0  stream /var/run/php-fpm.sock
root     php-fpm    634   7  stream /var/run/php-fpm.sock
I verified that the socked /var/run/php-fpm.sock actually exists. Also, as the dummy file with just phpinfo() in it still works I don't expect this to be an issue.

Snipped from /usr/local/etc/php-fpm.conf:
Code:
listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
listen.mode = 0660

I threw almost everything out of the nginx config file(s) (as I have a separate config file for each virtual host). Static HTML pages and the index.php calling phpinfo() are still working but still just the blank page with the favicon on the MediaWiki page.
 
Both favicon.ico and index.php are located in the top-level folder of the MediaWiki: /usr/local/www/wiki.ugfx.org which is also the path to which the root has been pointed to in the nginx config.

Changing the PHP-FPM socket from unix:/var/run/php-fpm.sock to 127.0.0.1:9000 didn't help (I didn't forget to change the setting in the nginx configuration file too).

Regarding the database: One specified the database user (as well as passwort and host) in the LocalSettings.php. Also, from past experiences I know that MediaWiki would show a static HTML page that states that it can't access the database in case of there would be a problem. Furthermore, when installing a new MediaWiki there's no database access as the installer (the web interface) hasn't been called yet. It's basically just a form that generates a LocalSettings.php at the end. But I can't even get to that state (as mentioned in an earlier post I tried to install a new MediaWiki to make sure that all my Nginx and PHP settings are correct).
 
Yes, without any problems.

But explicitly accessing /usr/local/www/wiki.ugfx.org/index.php results in a blank page too.
 
Try these lines in LocalSettings.php
Code:
# PHP errors
error_reporting( -1 );
ini_set('display_errors', 1 );

# Exception Error
$wgShowExceptionDetails = true;

# Debugging
$wgDebugToolbar = true;
$wgShowDebug = true;
$wgDevelopmentWarnings = true;
$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";

Maybe you need to "touch" the logfile first.
 
I added those lines to the bottom of LocalSettings.php. Still a blank page (no debug message) and the debug file stays empty too (I touched it, and I replaced the variable with the proper DB name). Something must be seriously broken here.
Any other ideas?

Edit: As mentioned before I also downloaded a fresh MediaWiki archive and with that I get a blank page too and no debug messages. And at that stage there's not even a database connection required as it should just show up an installation assistant in the browser.
 
nginx-access.log
Code:
2016/01/31 14:23:39 [notice] 896#0: signal 15 (SIGTERM) received, exiting
2016/01/31 14:23:39 [info] 896#0: kevent() failed (4: Interrupted system call)
2016/01/31 14:23:39 [notice] 896#0: exiting
2016/01/31 14:23:39 [notice] 895#0: signal 15 (SIGTERM) received, exiting
2016/01/31 14:23:39 [notice] 897#0: signal 15 (SIGTERM) received, exiting
2016/01/31 14:23:39 [info] 897#0: kevent() failed (4: Interrupted system call)
2016/01/31 14:23:39 [notice] 897#0: exiting
2016/01/31 14:23:39 [notice] 896#0: exit
2016/01/31 14:23:39 [notice] 897#0: exit
2016/01/31 14:23:39 [notice] 895#0: signal 20 (SIGCHLD) received
2016/01/31 14:23:39 [notice] 895#0: worker process 897 exited with code 0
2016/01/31 14:23:39 [notice] 895#0: signal 20 (SIGCHLD) received
2016/01/31 14:23:39 [notice] 895#0: worker process 896 exited with code 0
2016/01/31 14:23:39 [notice] 895#0: exit
2016/01/31 14:24:27 [notice] 635#0: using the "kqueue" event method
2016/01/31 14:24:27 [notice] 635#0: nginx/1.8.0
2016/01/31 14:24:27 [notice] 635#0: OS: FreeBSD 10.2-RELEASE-p9
2016/01/31 14:24:27 [notice] 635#0: kern.osreldate: 1002000, built on 1001000
2016/01/31 14:24:27 [notice] 635#0: hw.ncpu: 2
2016/01/31 14:24:27 [notice] 635#0: net.inet.tcp.sendspace: 32768
2016/01/31 14:24:27 [notice] 635#0: kern.ipc.somaxconn: 128
2016/01/31 14:24:27 [notice] 635#0: getrlimit(RLIMIT_NOFILE): 58284:58284
2016/01/31 14:24:27 [notice] 636#0: start worker processes
2016/01/31 14:24:27 [notice] 636#0: start worker process 637
2016/01/31 14:24:27 [notice] 636#0: start worker process 638
2016/01/31 14:24:27 [notice] 636#0: signal 23 (SIGIO) received
2016/01/31 14:24:55 [info] 638#0: *3 client closed connection while waiting for request, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:80
2016/01/31 14:29:35 [info] 637#0: *5 client closed connection while waiting for request, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:80
2016/01/31 14:37:51 [info] 637#0: *10 client closed connection while waiting for request, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:80

nginx-access.log
Code:
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:34 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:35 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:35 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:35 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:35 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:36 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:36 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:23:36 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:24:37 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:24:37 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:29:17 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:29:17 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:29:17 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:29:18 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:29:18 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:29:18 +0000] "GET /favicon.ico HTTP/1.1" 200 15086 "http://wiki2.ugfx.org/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"
xxx.xxx.xxx.xxx - - [31/Jan/2016:14:37:34 +0000] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"

php-fpm.log
Code:
107 [31-Jan-2016 14:23:39] NOTICE: Terminating ...
108 [31-Jan-2016 14:23:39] NOTICE: exiting, bye-bye!
109 [31-Jan-2016 14:24:27] NOTICE: fpm is running, pid 630
110 [31-Jan-2016 14:24:27] NOTICE: ready to handle connections
These are due to me manually restarting the php-fpm service.

pkg info -ix php
Code:
root@medusa:~ # pkg info -ix php
php56-5.6.17
php56-ctype-5.6.17
php56-dom-5.6.17
php56-gd-5.6.17
php56-hash-5.6.17
php56-iconv-5.6.17
php56-json-5.6.17
php56-mbstring-5.6.17_1
php56-mysql-5.6.17
php56-mysqli-5.6.17
php56-readline-5.6.17
php56-session-5.6.17
php56-sockets-5.6.17
php56-xml-5.6.17
php56-xmlreader-5.6.17
php56-zlib-5.6.17
 
I installed the two PHP modules that you mentioned. Still a blank page on both the wiki I want to migrate to the new host as well as the "fresh install".
 
In the Nginx logfile should appear index.php. This points to Nginx which does not process it.
Let's have a look on the complete simplified nginx.conf
 
No index.php mentioned anywhere in the Nginx logfiles.

Anyway, it's finally working. I was so desperately waiting for your next post that I started browsing through the new posts and I came across this one: https://forums.freebsd.org/threads/nginx-freebsd-slow-download.54956/
I took a look at the linked nginx config file and I saw that I was missing this line in my Nginx configuration: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; This would also explain why we don't see any index.php listed in the log files.
Now it's working perfectly fine...

Sorry for all the trouble. I appreciate your help a lot, guys!
 
For anybody that comes around this thread in the future: The following nginx.conf is working for my MediaWiki 1.23.1 running on Nginx 1.8.0 with PHP-FPM 5.6.17 on a FreeBSD 10.2 machine:
Code:
user www;
worker_processes 2;


error_log  /var/log/nginx.error.log  info;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    access_log  /var/log/nginx.access.log;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    # GZIP compression
    gzip on;
    gzip_comp_level 5;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_disable "msie6";
    gzip_types
        text/plain
        text/css
        text/xml
        text/javascript
        application/xml
        application/javascript
        application/x-javascript;


    # The actual HTTP server for the MediaWiki
    server {
        listen 80;
        listen [::]:80;

        server_name wiki.ugfx.org;
        root /usr/local/www/wiki.ugfx.org;
        index index.php;

        client_max_body_size 5m;
        client_body_timeout 60;

        location / {
           try_files $uri $uri/ @rewrite;
        }

        location @rewrite {
           rewrite ^/(.*)$ /index.php?title=$1&$args;
        }

        location ^~ /maintenance/ {
           return 403;
        }

        location ~ \.php$ {
           try_files $uri =404;
           fastcgi_pass unix:/var/run/php-fpm.sock;
           fastcgi_index index.php;
           fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
           include fastcgi_params;
        }

        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 /usr/local/www/wiki.ugfx.org/local;
           autoindex on;
        }
    }
}
Disclaimer: I don't say that this configuration is correct, safe or anything else. I am just saying that it works. Use this on your own risk!
 
Back
Top