Giter VIP home page Giter VIP logo

nginx-boilerplate's Introduction

#Nginx Boilerplate Awesome Nginx configuration template and a set of handy must-have snippets.


Features

  • Convenient include-based config structure
  • Optimized defaults
  • Connection and requests rate limitation settings
  • Backend response caching
  • Various predefined locations
  • Advanced logging

Try it

  • Update the "root" directive in src/sites/default.conf
  • (optional) Update the "user" directive in src/system.conf
  • (optional) Make sure "user" has access to the locations specified in src/system.conf (access logs, php socket, fastcgi tmp dirs)
  • (optional) Check src/nginx-bp/upstreams/php.conf to match your php-fpm setup (socket vs TCP/IP)
  • Run build/run.sh as privileged user to restart Nginx in boilerplate mode
  • Go to http://localhost/ (or http://your_etc_hostname/, or http://127.0.0.1/)

Install

  • Copy the contents of src/ to your nginx config directory (usually /etc/nginx)
  • (optional) Update the "user" directive in src/system.conf if needed
  • (optional) Make sure "user" has access to the specified in src/system.conf locations
  • (optional) Check src/nginx-bp/upstreams/php.conf to match your php-fpm setup (socket vs TCP/IP)
  • Create/migrate your vhosts to sites/
  • (optional) To disable a site change its config's file extention to anything other than .conf

If nothing works

  • Check the contents of /var/log/nginx/default.error.log
  • Create an issue on the project's github page

nginx-boilerplate's People

Contributors

umkus avatar kxepal avatar davgothic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.