Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AvnerCohen
Created November 5, 2017 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AvnerCohen/b29a27eb3c4caf2b6f68a2b391d43b22 to your computer and use it in GitHub Desktop.
Save AvnerCohen/b29a27eb3c4caf2b6f68a2b391d43b22 to your computer and use it in GitHub Desktop.
Install nginx with clear_more_headers - Latest Version 1.13.6
yum update -y nginx
yum install -y pcre-devel
service nginx stop
mkdir ~/nginx_test
cd ~/nginx_test/
wget 'http://nginx.org/download/nginx-1.13.6.tar.gz'
tar -xzvf nginx-1.13.6.tar.gz
wget https://github.com/openresty/headers-more-nginx-module/archive/v0.33.tar.gz
tar -xzvf v0.33.tar.gz
cd nginx-1.13.6/
./configure --prefix=/opt/nginx --add-module=/root/nginx_test/headers-more-nginx-module-0.33
make
make install
mv /usr/sbin/nginx /usr/sbin/nginx_bak
ln -sf /opt/nginx/sbin/nginx /usr/sbin/nginx
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment