Skip to content

Instantly share code, notes, and snippets.

@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
@ross-u
ross-u / README.md
Last active June 9, 2023 04:59
M3 - Project Setup ( 2 repos, React + Node/Express )

M3 - Project Setup (2 repos, React + Node/Express)


Getting Started

@Igor-Lopes
Igor-Lopes / lamp-util.md
Created May 1, 2017 05:10
Install LAMP on CentOS/RHEL/ 7

Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/ 7

Install Apache:

yum install httpd -y

Start the Apache service and make it to start automatically on every reboot:

systemctl start httpd