Skip to content

Instantly share code, notes, and snippets.

View bsnacks000's full-sized avatar
🎯
Focusing

Johnny bsnacks000

🎯
Focusing
View GitHub Profile
# based on the digital ocean guides
# This is for configuring nginx to proxy_pass to multiple backend servers
# from a gateway server.
# 1. install
$ sudo apt update
$ sudo apt install nginx
# 2. adjust firewall
$ sudo ufw allow 'Nginx Full'
# for dev purposes or machines that aren't opened up to the public
# ref: https://www.humankode.com/ssl/create-a-selfsigned-certificate-for-nginx-in-5-minutes
# 1. make a local directory...create a conf file for localhost config
$ sudo nano localhost.conf
# paste this in there...
-------------------------------
[req]
default_bits = 2048
# basic setup for a single droplet with ssh and firewall config
# reference: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
1. Login in as root
$ root@xxx.xxx.xxx.xxx
2. Add a non-root user, give sudo privelages and transfer ssh public key
$ adduser sammy
$ usermod -aG sudo sammy
$ rsync --archive --chown=sammy:sammy ~/.ssh /home/sammy
curl https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore > .gitignore