Skip to content

An example of a complex NginX configuration based on best practices

License

Notifications You must be signed in to change notification settings

die-net/nginx-config-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nginx-config-example Build Status

This is a complex NginX configuration example that incorporates much of what I have learned about running NginX for years at scale at several large sites I've been involved with.

The most interesting features are:

  • A rich set of includes to add functionality at the server block or location block level.
  • The use of maps to do complex conditionals instead of trying to rely on the limited "if".
  • The use of chained "geo" and "map" to do conditional rate-limiting.

There are other goodies sprinkled throughout.

It is meant to be used as the basis for your own NginX config. Copy and modify it, removing the parts that aren't relevant to you.

About

An example of a complex NginX configuration based on best practices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published