Comments (5)
Hi,
Maybe this part of the code is more or less absolute but not all!
The work that @angristan does is very good.Propose him a PR with the new module ....
# GeoIP2
if [[ "$GEOIP" = 'y' ]]; then
# Dependency
add-apt-repository ppa:maxmind/ppa -y >> /tmp/nginx-autoinstall.log 2>&1
apt update >> /tmp/nginx-autoinstall.log 2>&1
apt install libmaxminddb0 libmaxminddb-dev mmdb-bin >> /tmp/nginx-autoinstall.log 2>&1
cd /usr/local/src/nginx/modules || exit 1
git clone --recursive https://github.com/leev/ngx_http_geoip2_module >> /tmp/nginx-autoinstall.log 2>&1
echo -ne " Downloading GeoIP2 databases [..]\\r"
sudo mkdir -p /etc/nginx/geoip2/
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz >> /tmp/nginx-autoinstall.log 2>&1
tar xaf GeoLite2-Country.tar.gz --strip 1
mv GeoLite2-Country.mmdb /etc/nginx/geoip2/
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz >> /tmp/nginx-autoinstall.log 2>&1
tar xaf GeoLite2-City.tar.gz --strip 1
mv GeoLite2-City.mmdb /etc/nginx/geoip2/
if [ $? -eq 0 ]; then
echo -ne " Downloading GeoIP2 databases [${CGREEN}OK${CEND}]\\r"
echo -ne "\\n"
else
echo -e " Downloading GeoIP2 databases [${CRED}FAIL${CEND}]"
echo ""
echo "Please look at /tmp/nginx-autoinstall.log"
echo ""
exit 1
fi
fi
Then in nginx modules line add
GeoIP2
if [[ "$GEOIP" = 'y' ]]; then
NGINX_MODULES=$(echo "$NGINX_MODULES"; echo "--add-module=/usr/local/src/nginx/modules/ngx_http_geoip2_module")
fi
That will do it to change out and add support for geoip2
from nginx-autoinstall.
Salut,
Je te relance concernant l'issue.
C'est loin d'être grave mais comme je n'ai eu aucune réponse !
from nginx-autoinstall.
Translation
"
Hi,
I just realized by using your installation script that GeoIP does not work and that's normal.
When you download the two GeoIP files, you put them in "/ usr / local / src / nginx / modules / geoip-db". The problem is that you delete them at the end of the script for cleaning, without moving the "geoip-db" folder in "/ opt", as indicated in the README.md"
Translation
"Hi,
I am relaunching you on the issue.
It is far from serious but as I had no answer!"
The answer would be to move the files to that folder or I suggest you use the following path:
/etc/nginx/geoip
The real problem is that this script is out of date and we actually want to support the geo ip2 database format as geo ip 1 is becoming obsolete.
Really we need to get the script modified to support ngx_http_geoip2_module
Halla if you hear me!
from nginx-autoinstall.
Hi,
Maybe this part of the code is more or less absolute but not all!
The work that @angristan does is very good.
Propose him a PR with the new module ....
from nginx-autoinstall.
Added in 0bcd264
from nginx-autoinstall.
Related Issues (20)
- Lua build error
- [IMPROVE] adding support for custom ZLIB and PCRE build
- right config for 443
- Quiche broken installation HOT 2
- add ngx_php7 module
- /usr/sbin/nginx: No such file or directory HOT 1
- can't install quic HOT 2
- Brotli make ended in error HOT 3
- Add NGINX-QUIC HOT 9
- Certbot
- nginx.conf question
- quic not working with ipv6 HOT 4
- Replace old `ngx_cache_purge` module source with a maintained fork HOT 1
- Support Zstd HOT 3
- set-misc-nginx-module not loaded HOT 1
- Option to reuse compiled/downloaded files
- Build failing on Ubuntu 22.04 with Brotli HOT 2
- Support certbot
- Support test coockie module
- support add nginx modules HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-autoinstall.