Skip to content

Instantly share code, notes, and snippets.

@sangcu
sangcu / letsencrypt.md
Created September 3, 2016 15:14 — forked from xrstf/letsencrypt.md
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@sangcu
sangcu / faye.rb
Last active August 29, 2015 14:26 — forked from tmcallister/faye.rb
Faye with nginx config
FAYE_TOKEN = 'secretToken'
if defined? Rails
if Rails.env == 'development'
FAYE_URI = "http://#{APP_CONFIG[:nameremoved_service][:host]}:9292/faye"
else
FAYE_URI = "https://#{APP_CONFIG[:nameremoved_service][:host]}/faye"
end
@sangcu
sangcu / Ember.Editable.js
Created August 8, 2012 17:01 — forked from pjlammertyn/Ember.Editable.js
Ember.Editable mixin
Ember.Editable = Ember.Mixin.create({
_originalPropertyStates: Ember.Map.create(),
_isEditing: false,
willDestroy: function () {
var $this = this;
for (var prop in this.getOwnProperties()) {
Ember.removeBeforeObserver($this, prop, $this, '_beforePropertyChange');
}
},