GithubHelp home page GithubHelp logo

sheldonlendrum / nginx-new-site-with-certbox Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 7 KB

Simple script to setup a new site with a Lets Encrypt SSL Certificate

License: MIT License

Shell 100.00%

nginx-new-site-with-certbox's Introduction

NGINX: Create a New Site/virtual Host and secure it with Lets Encrypt SSL Certificate

Simple script to setup a new site with a Lets Encrypt SSL Certificate

Learn more about Lets Encrypt for NGINX https://letsecure.me/secure-web-deployment-with-lets-encrypt-and-nginx/

First Steps:

Install certbot

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

Check out this script then make it excuitable

chmod .+ new_site.sh

Edit any variables

You will need to check the script as I have set the paths to the default NGINX install on Ubuntu 16.04 which assumes the gninx sites config are in /etc/nginx/sites-enabled and that your web root is /var/www/.

How to use:

As root (sudo user)

sudo ./new_site.sh

You will be promted to enter the root domain, eg: example.com (NOT www.example.com)

As basic config file will be created, NGINX will be reloaded, and then the Certbot Let Encrypt call will be made. Once that has created the certificates, a full secure hardened conf file will be installed and NGINX will be reloaded again.

A site folder will be created on the server in

/var/www/{domain}/www

NGINX will be configured to point to here also.

You're ready to go!

Do what you want

Do what you want with this, use it, alter it, give feedback. If you have suggestions to make it better, please let me know.

nginx-new-site-with-certbox's People

Contributors

sheldonlendrum avatar

Watchers

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