Skip to content

Instantly share code, notes, and snippets.

@bsemot
bsemot / nginx.conf
Created June 22, 2017 09:55 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@bsemot
bsemot / nginx_http2_pagespeed_setup.sh
Last active October 23, 2019 08:42
Ubuntu 16.04 - Nginx Build Script ( http2, page-speed, pcre, headers-more, geoip )
#!/bin/bash
set -e
# directory config
SRC_ROOT=/tmp
SERVICE_ROOT=/lib/systemd/system
NGINX_ROOT=/etc/nginx
REDIS_ROOT=/etc/redis
# versions config
#!/bin/bash
### BINARIES ###
TAR="$(which tar)"
GZIP="$(which gzip)"
MYSQL="$(which mysql)"
MYSQLDUMP="$(which mysqldump)"
### SYSTEM SETUP ###
BACKUP_PARENT_DIR="_PATH_TO_BACKUP_DIRECTORY_"