A collection of production-ready Nginx configuration snippets, templates, and best practices for common web server setups.
nginx-common-configuration is a collection of reusable Nginx configuration files, snippets, and templates that implement production best practices for security, performance, and maintainability. It solves the problem of manually assembling and debugging Nginx configs by providing modular, well-documented setups for common use cases like SSL, caching, logging, and Docker deployment.
DevOps engineers, system administrators, and backend developers who deploy and manage Nginx servers for websites, applications, APIs, or load balancing.
Developers choose this project because it offers battle-tested configurations from real-world high-traffic environments, avoids common pitfalls documented in the 'Known traps' section, and saves significant time compared to piecing together solutions from scattered documentation.
Nginx common useful configuration
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Splits core settings into reusable files in `conf.d`, allowing easy customization and maintenance without modifying the main nginx.conf.
Implements SSL configurations based on Mozilla guidelines and includes security headers, providing robust protection out of the box against common vulnerabilities.
Offers Dockerfile and docker-compose examples with custom envsubst templating to handle default values, overcoming limitations of the default GNU envsubst.
Includes templates for CORS, site configuration, and static file serving, based on years of real-world high-traffic experience to avoid pitfalls like cache breaking client content.
Caching is disabled by default in cache.conf, requiring users to manually enable and configure it, which can be error-prone and complex for dynamic applications.
The configurations and 'Known traps' section require a good understanding of Nginx internals, making it less accessible for beginners or those seeking plug-and-play solutions.
Focuses primarily on Nginx configs; integration with other tools like CDNs or cloud-specific services isn't covered, requiring additional setup.