Giter VIP home page Giter VIP logo

nginx-setup-https's Introduction

Nginx minimalistic configuration guide

UPDATE: Now you can simply install the https util like so in 1 step:

sudo apt install python3-certbot-nginx

Then execute the utility with:

certbot

Note the python3.

End update.

First off all, you need a domain pointing to your VPS to activate SSL.

To setup SSL follow these steps:

  1. Install nginx and use the basic template from this repository. Remember to add your domain name in server_name otherwise you won't be able to add a SSL certificate.

  2. Run these commands to install certbot:

sudo add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install python-certbot-nginx
  1. Setup your nginx server and install the certificate:
sudo service nginx restart
sudo certbot --nginx -d <YOUR-DOMAIN>.com -d www.<YOUR-DOMAIN>.com
  1. That's it! You now should have SSL enabled. Remember to setup pm2 to have a node.js server running all the time.

  2. To auto-renew the certificates add a cronjob by doing the following:

  • Run: crontab -e
  • Then do: 0 12 * * * certbot renew

That will check every day at 12pm and update if necessary. Check this tab generator to verify it: https://crontab.guru/#0_12___*

nginx-setup-https's People

Contributors

merlox avatar

Stargazers

 avatar  avatar

Watchers

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