Skip to content

Instantly share code, notes, and snippets.

😀

maszd

😀
Block or report user

Report or block maszd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NginxRedirect.md

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

@maszd
maszd / pecl-memcached.sh
Created Sep 30, 2017 — forked from paul91/pecl-memcached.sh
How to install php memcached on CentOS 6.5
View pecl-memcached.sh
#!/bin/bash
# How to install PHP memcached on CentOS 6.5
# Install dependencies
yum install cyrus-sasl-devel zlib-devel gcc-c++
# Get the latest libmemcached
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
tar -xvf libmemcached-1.0.16.tar.gz
@maszd
maszd / nginx.conf
Created Apr 6, 2017 — 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/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View Nginx 1.11.6 OpenSSL 1.1 Centos 7
# Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5
# "6" for CentOS6 or Amazon Linux, "7" for CentOS7
CENTVER="7"
OPENSSL="openssl-1.1.0c"
NGINX="nginx-1.11.6-1"
yum clean all
# Install epel packages (required for GeoIP-devel)
View compile-nginx.sh
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN
@maszd
maszd / compile-nginx.sh
Created Apr 3, 2017 — forked from sergeifilippov/compile-nginx.sh
Compile nginx from source with latest openssl, without-mail, modules: pagespeed, echo
View compile-nginx.sh
# Install dependencies
#
# Setup adjustable vars
NGX_MODULE_PATH=$HOME/source
NGX_VERSION=1.10.2
OPENSSL_VERSION=1.0.2j
NGX_MODULE_ECHO=0.60
NGX_MODULE_CACHEPURGE=2.3
NGX_MODULE_HEALTHCHECK=0.3.0
@maszd
maszd / 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)
View Nginx_1.11_Mainline_Cent_6_7_Static_OpenSSL_1.1.sh
# 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)
View gist:4e0e86ef78e576fc342f229d7bd7f497
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools
OPENSSL="openssl-1.0.2k"
NGINX_VERSION="1.11.12-1"
NJS_VERSION="1.11.12.0.1.9-1"
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-geoip-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-image-filter-$NGINX_VERSION.el7.ngx.src.rpm
You can’t perform that action at this time.