Moving MediaWiki to nginx

In a previous article we described the migration of this WordPress site from Apache to nginx. This article describes a similar task involving a private MediaWiki site.

The front-end is an internet-facing reverse-proxy enforcing SSL with client certificates. The back-end is implemented with nginx and php-fpm. Both ends run inside jails on FreeBSD servers.

This article focusses on the back-end configuration, the nginx instance that serves static content from the MediaWiki installation at /usr/local/www/mediawiki/ and forwards PHP requests to the php-fpm service listening on port 9000.

Continue reading Moving MediaWiki to nginx

Moving WordPress to nginx

This WordPress site has been migrated from Apache to nginx. The front-end is an internet-facing reverse-proxy using nginx, with the back-end using nginx and php-fpm. Both ends run inside jails on FreeBSD servers.

This article focusses on the back-end configuration, the nginx instance that serves static content from the WordPress installation at /usr/local/www/wordpress/ and forwards PHP requests to the php-fpm service listening on port 9000.

Continue reading Moving WordPress to nginx

Nginx: alias, try_files and PHP

Web servers map URIs to pathnames, and the simplest mapping is concatenating the document root and the URI, which is managed using the root directive.

Sometimes, part of the URI needs to be removed before performing a concatenation, in which case the alias directive may be useful.

This article addresses issues from using the `alias` directive with the try_files directive and with php-fpm. Continue reading Nginx: alias, try_files and PHP