Skip to content

Instantly share code, notes, and snippets.

View binarweb's full-sized avatar
🛌
Sleeping at the gym.

Binar Web binarweb

🛌
Sleeping at the gym.
View GitHub Profile
@binarweb
binarweb / nginx_config_cloudfront_real_ips.js
Created April 17, 2018 08:47 — forked from radiofrequency/nginx_config_cloudfront_real_ips.js
list cloufront ip ranges for nginx real ip module
var request = require("request");
var fs = require("fs");
var output = "#cloudfront ip ranges\n";
request("https://ip-ranges.amazonaws.com/ip-ranges.json", function(err, res, body) {
if (err) {
console.error("error", err);
}
var j = JSON.parse(body);
j.prefixes.forEach(function(item) {
if (item.service ==='CLOUDFRONT') {
@binarweb
binarweb / LetsEncrypt.md
Created April 16, 2018 15:48 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt