Skip to content

Instantly share code, notes, and snippets.

To setup NGINX server && Securing it with Let's Encrypt

Part 1: Setting up NGINX server

Run this script to setup a working NGINX server proxying requests to the gunicorn server.

NOTES

  1. The script should run with sudo privilages.
  2. Running the script: sudo bash nginx_deploy.sh
  3. There must be a NGINX server config file should already present be present in the directory.
  4. Sample config file used: server_start
@manu-chroma
manu-chroma / nginxproxy.md
Created March 17, 2016 21:39 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@manu-chroma
manu-chroma / getting fb username(2).py
Created March 2, 2016 18:16
using robobrowser and beautiful soup. Supports both python 2.7 and 3
from robobrowser import RoboBrowser
from getpass import getpass
from bs4 import BeautifulSoup as bs
browser = RoboBrowser(history=True)
browser.open('https://m.facebook.com/')
# GETTING INPUT
mail = input('Email : ')
password = getpass('Password : ')
@manu-chroma
manu-chroma / getting fb username.py
Created February 11, 2016 19:13
note: mechanize doesn't support python 3
import mechanize
from bs4 import BeautifulSoup as bs
from getpass import getpass
#USER CREDENTIALS
email = raw_input("email: ")
password = getpass("password: ")
#GETTING SOURCE CODE
browser = mechanize.Browser()