All posts by Richard Smith

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

Extension-less Configuration for nginx

Many web designers want their URLs to appear in a particular format on the browser’s address bar. On this website we use pretty permalinks with a trailing slash.

But this article describes an nginx configuration that supports URLs without a trailing slash or a file extension. So the URL /foo might refer to a directory index (/foo/index.php), a static file (/foo.html) or a script (/foo.php), whichever is located first within a predefined order.

Continue reading Extension-less Configuration for nginx

Moving MediaWiki to nginx

See revised article

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

See revised article

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

Replace Sendmail with Postfix

Postfix has been used on my mail servers for a number of years. My other servers only need minimal email to send out periodic reports, so Sendmail from the base system is adequate, easily started from /etc/rc.conf and works out of the box (until recently).

After updating FreeBSD to 10.1-RELEASE-p12 a couple of days ago, to address a security advisory relating to OpenSSL, Sendmail now refuses to work. Long story short, I decided to take this opportunity to replace Sendmail with a submit-only PostFix installation.

Continue reading Replace Sendmail with Postfix