Skip to content

Instantly share code, notes, and snippets.

View niamrox's full-sized avatar

Niamul Hasan niamrox

View GitHub Profile
@niamrox
niamrox / letsencrypt.md
Created October 10, 2016 20:16 — 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:

@niamrox
niamrox / wpcommon.conf
Created February 15, 2016 00:20 — forked from rahul286/wpcommon.conf
EDD downloads security with EasyEngine
# For more details, refer - https://easydigitaldownloads.com/support/topic/download-files-not-protected-nginx-under-easyengine/
# NOT tested (yet)
location /wp-content/uploads/ {
location ~ ^/wp-content/uploads/edd/(.*?)\.zip$ {
rewrite / permanent;
}
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
@niamrox
niamrox / Media Query Break Points
Last active June 2, 2017 13:57
BS3 - Media Query Break Points
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@niamrox
niamrox / .gitignore
Last active August 29, 2015 14:23 — forked from octocat/.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #