Skip to content

Instantly share code, notes, and snippets.

View yangvipguang's full-sized avatar
🏠
Working from home

杨光 yangvipguang

🏠
Working from home
View GitHub Profile
@yangvipguang
yangvipguang / haproxy.cfg
Created November 24, 2016 16:41 — forked from patmandenver/haproxy.cfg
Final haproxy.cfg for letsencrypt
global
log 127.0.0.1 syslog
maxconn 1000
user haproxy
group haproxy
daemon
tune.ssl.default-dh-param 4096
ssl-default-bind-options no-sslv3 no-tls-tickets
ssl-default-bind-ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
@yangvipguang
yangvipguang / le-renew-haproxy
Created November 24, 2016 16:41 — forked from patmandenver/le-renew-haproxy
Script for autorenewing Let'sEncyrpt certs for an Haproxy box
#!/bin/bash
#
# Let's Encrypt HAProxy script
#
###################################
DOMAINS=(
"foo.example.com"
"bar.example.com"
)
@yangvipguang
yangvipguang / haproxy.cfg
Created November 24, 2016 16:41 — forked from patmandenver/haproxy.cfg
haproxy with letsencrypt forwarding
global
log 127.0.0.1 syslog
maxconn 1000
user haproxy
group haproxy
daemon
defaults
log global
@yangvipguang
yangvipguang / nginx.conf
Created November 24, 2016 16:42 — forked from patmandenver/nginx.conf
nginx letsencrypt file
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
@yangvipguang
yangvipguang / letsencrypt.sh
Created November 24, 2016 16:43 — forked from patmandenver/letsencrypt.sh
Letsencrypt example
#!/bin/bash
#
# Put in your email and your actual domain name
# Server is for staging/testing not getting live certs
sudo letsencrypt certonly \
--server https://acme-staging.api.letsencrypt.org/directory \
--webroot --webroot-path "/usr/share/nginx/html/" \
--keep-until-expiring \
--text \
global
log 127.0.0.1 syslog
maxconn 1000
user haproxy
group haproxy
daemon
defaults
log global
@yangvipguang
yangvipguang / nginx.conf
Created November 24, 2016 16:43 — forked from patmandenver/nginx.conf
Ngnix conf that contains /check url that can go dark if file exists
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
@yangvipguang
yangvipguang / haproxy.cfg
Created November 24, 2016 16:44 — forked from thisismitch/haproxy.cfg
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@yangvipguang
yangvipguang / le-nginx-renew-DigitalOcean
Last active November 29, 2016 15:19 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"