Nginx - eNgineering the Web

Nginx - Engineering the Web

Table of Contents:

nginx provides FastCGI and reverse HTTP proxying, with or without caching, including simple load balancing and fault tolerance.

It has a modular architecture. Filters include gzipping, byte ranges, chunked responses, and SSI. Multiple SSI inclusions within a single page can be processed in parallel if they are handled by FastCGI or proxied servers. SSL and TLS SNI are supported.

Auto Start

As nginx has become part of the standard install, auto starting the service during system restarts is a configuration file away:

File extract: /etc/rc.conf.local


At system start up, rc.d will check the rc(8) configuration files for the flag nginx_flags. If the flag is set to NO (the default) the service will not be started. Clearing the flag tells rc.d to start nginx(8)

Configuring SSL

[Ref: httpsslmodule]

Configuring SSL is well documented


[Ref: Serverfault]

Rewrite/Redirect of http:// connections to https:// has many options, the one which I like came out of a serverfault answer shown below:

 server {
    listen   80;
    listen   [::]:80;


    return 301 https://$server_name$request_uri;
server {
    listen   443 default ssl;


    ssl_certificate        /path/to/my/cert;
    ssl_certificate_key  /path/to/my/key;


Life goes on.