Skip to content

Instantly share code, notes, and snippets.

@tannnt810
tannnt810 / Nginx_1.11_Mainline_Cent_6_7_Static_OpenSSL_1.1.sh
Created July 19, 2018 01:34 — forked from kennwhite/Nginx_1.11_Mainline_Cent_6_7_Static_OpenSSL_1.1.sh
RPM build Nginx 1.11.x with ALPN on CentOS 6/7 using static OpenSSL 1.1 (v 1.02+ required for http/2 support in Chrome)
# Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5
# "6" for CentOS6 or Amazon Linux, "7" for CentOS7
CENTVER="6"
OPENSSL="openssl-1.1.0-pre5"
NGINX="nginx-1.11.0-1"
yum clean all
# Install epel packages (required for GeoIP-devel)
@tannnt810
tannnt810 / tmux-cheatsheet.markdown
Created June 19, 2017 03:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tannnt810
tannnt810 / 1) Install
Created March 2, 2017 08:12 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@tannnt810
tannnt810 / gist:6db6620de7553f6b55919c9fda88a3dc
Created March 2, 2017 08:11 — forked from nghuuphuoc/gist:7884874
Some of useful Nginx rewrite rules
// Nginx redirect non-www to www
server {
listen 80;
server_name domain.com;
rewrite ^/(.*)$ http://www.domain.com/$1 permanent;
}
server {
listen 80;
server_name www.domain.com;