Skip to content

Instantly share code, notes, and snippets.

@bcambel
Last active March 27, 2018 08:07
Show Gist options
  • Save bcambel/ea697c60ff8f45312745959ec6938785 to your computer and use it in GitHub Desktop.
Save bcambel/ea697c60ff8f45312745959ec6938785 to your computer and use it in GitHub Desktop.
Open Resty Install script on Ubuntu 16.04
#!/bin/bash
VERSION="1.11.2.2"
wget https://openresty.org/download/openresty-${VERSION}.tar.gz
wget https://openresty.org/download/openresty-${VERSION}.tar.gz.asc
gpg --keyserver pgpkeys.mit.edu --recv-key A0E98066
gpg openresty-${VERSION}.tar.gz.asc
gpg openresty-${VERSION}.tar.gz.asc
tar -xvf openresty-${VERSION}
cd openresty-${VERSION}
sudo apt-get install build-essential libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl -y
./configure -j2 --with-pcre-jit --with-ipv6
make -j2
sudo make install
sudo ufw allow http
cat > /usr/local/openresty/nginx/conf/nginx.conf <<- EOM
user www-data;
worker_processes auto;
pid /run/openresty.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/openresty/access.log;
error_log /var/log/openresty/error.log;
gzip on;
gzip_disable "msie6";
include ../sites/*;
}
EOM
sudo mkdir /var/log/openresty
sudo systemctl daemon-reload
sudo systemctl start openresty
sudo systemctl enable openresty
@sairamdevarashetty
Copy link

wget https://openresty.org/download/openresty-${VERSION}.tar.gz gives the following error

--2017-12-18 12:34:03--  https://openresty.org/download/openresty-.tar.gz
Resolving openresty.org (openresty.org)... 188.166.239.230
Connecting to openresty.org (openresty.org)|188.166.239.230|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-12-18 12:34:04 ERROR 404: Not Found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment