-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
generalmat82 edited this page May 6, 2026
·
11 revisions
This Installation guide is written assuming a new ubuntu server 24.04 instance.
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates lsb-release
wget -O - https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null
sudo apt-get update
sudo apt-get -y install openresty
opm get anjia0532/lua-resty-maxminddb
apt install libmaxminddb0 libmaxminddb-dev redis
opm get xiangnanscu/lua-resty-ipmatcher
follow the instructions found here: https://dev.maxmind.com/geoip/updating-databases/
wget https://github.com/maxmind/geoipupdate/releases/download/v7.1.1/geoipupdate_7.1.1_linux_amd64.deb
sudo dpkg -i geoipupdate_7.1.1_linux_amd64.deb
geoipupdate
sudo nano /etc/GeoIP.conf
geoipupdate
sudo geoipupdate
sudo crontab -e
download the repo under /usr/local/lua
git clone https://github.com/generalmat82/openresty-Dynamic-Access-Control.git
under the same directory:
rm /etc/openresty/nginx.conf
ln openresty-Dynamic-Access-Control/nginx.conf /etc/openresty/nginx.conf
First you must make the example the correct name cp secrets.lua.example secrets.lua
using your preferred text editor, modify the secrets.lua file. Modifying the values as wanted.
There is one specific line required for the redis configuration:
user <username> on +@read +@write #<hashed_password> +@keyspace +@connection ~*
The entry must be entered in the redis.conf of the ACL file if activated. for the password, ensure it is has via sha256 and is in hex digits.