[Nginx Server Configs homepage] (https://github.com/davidlonjon/server-configs-nginx)
This is a fork from Nginx HTTP server boilerplate configs and has deviated quite a bit.
- nginx version 1.2.1+
There are two ways to make use of the contents of this repository, as a reference
or directly as the source for nginx to run from. A number of config snippets are
provided allowing you to pick and choose which features to allow/expose - some
snippets are dependent on other features in this repository. For example rules that
rely on a specific mime type for a given file extension, expect/rely the use of the
bundled mime.types
file.
To use as reference requires no special installation steps, download/checkout the repository to a convenient location and adapt your existing nginx configuration incorporating the desired functionality from this repository.
To use directly, replace the nginx config directory with this repository. for example:
# Stop nginx
/etc/init.d/nginx stop
# Backup current Nginx config
cd /etc
mv nginx nginx-previous
# Clone nginx
git clone git@github.com:davidlonjon/server-configs-nginx.git nginx
or sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK git clone git@github.com:davidlonjon/server-configs-nginx.git nginx
if you cannot git clone under sudo
# install-specific edits
# Start nginx
/etc/init.d/nginx start
Install specific edits will vary from server to user, see Getting started from the original repo to get an idea for a description of the required steps. They might not full apply to this repo
This repository has the following structure, which is based on the standard install for a webserver on debian:
.
├── doc
├── h5bp
├── sites-available
└── example.com
├── sites-enabled
├── mime.types
└── nginx.conf
Below is a general description of each section
This directory contains config snippets (mixins) to be included as desired.
This directory should contain all of the server definitions that are available for use.
This directory should contain only symlinks to enable a specific sites-available
server.
The mime.types file is responsible for mapping file extensions to mime types.
The main nginx config file.