GithubHelp home page GithubHelp logo

wprobot / nginx-recipes-for-the-lazy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omarchehab98/nginx-recipes-for-the-lazy

0.0 1.0 0.0 13 KB

Copy-paste ready Nginx configuration for static sites, reverse proxy, single page web apps, php, wordpress, ...

nginx-recipes-for-the-lazy's Introduction

Nginx Recipes For The Lazy

Tested on Ubuntu 16.04 and 18.04

Static Server

static.conf

Static Server for Clientside Routers (React, Angular, Vue.js, ...)

spwa.conf

HTTP Proxy Server (Node.js, Python, ...)

proxy.conf

PHP Proxy Server

php.conf

WordPress Server

wordpress.conf

SSL

LetsEncrypt certbot.eff.org

/etc/ssl/certs/dhparam.pem

openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096

/etc/ssl/certs/ssl-cert-snakeoil.pem
/etc/ssl/private/ssl-cert-snakeoil.key

make-ssl-cert generate-default-snakeoil --force-overwrite 

Wildcard Certificate with Cloudflare

certbot certonly \
    --preferred-challenges dns-01 \
    --dns-cloudflare --dns-cloudflare-credentials /root/.cloudflare.ini \
    -d 'example.com,*.example.com'

# Renewal
certbot renew \
    --dns-cloudflare --dns-cloudflare-credentials /root/.cloudflare.ini \
    --pre-hook "systemctl stop nginx" \
    --post-hook "systemctl start nginx"
    # REMINDER: --dry-run

/root/.cloudflare.ini

dns_cloudflare_email = "[email protected]"
dns_cloudflare_api_key = "abcdefghijklmnopqrstuvwxyz0"

nginx-recipes-for-the-lazy's People

Contributors

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