Giter Site home page Giter Site logo

nginx-conf's Introduction

my nginx configuration ๐ŸŒธ

this repo stores the nginx configuration for my personal server

๐Ÿช requirements

  • nginx (1.25.1+), compiled with...
    • http2 (--with-http_v2_module)
    • image-filter (--with-http_image_filter_module)
    • pcre (--with-pcre)
    • ssl (--with-http_ssl_module)

โœ๏ธ editing

you can add more site .conf files in the sites/ directory. they are all automagically included.

ssl certificates

if you include any new ssl certificates, make sure these are included in certificates.toml. this file is in the format of:

certificate_name = ["domain1.example.org", "domain2.example.org"]

the assumption is that certbot is set up so the certificate files (fullchain.pem and privkey.pem) will end up in the directory /etc/letsencrypt/live/{certificate_name}/.

๐Ÿš€ deploying

The nginx.conf file from this repository should be used as nginx's config using the -c flag. this can be set in nginx's systemd configuration file, for example.

when set up like this, the relative include paths in this repository should resolve as expected.

before restarting nginx

if you've just pulled in new changes, it's worth making sure ssl certificates are all in place before reloading nginx config. you can do this with a simple python script (run as root):

sudo python prepare.py

you can use the --force-remake flag if you want to renew all certificates, not just those that don't already exist.

make sure you are using python 3.11 or above! the script relies on the tomllib package that was included in the standard library from 3.11.

๐Ÿฌ license

like pretty much everything i put online, this comes along with the bsd 2-clause license. read it and weep.

nginx-conf's People

Contributors

m5ka 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.