-
504 Gateway Timeout
upstream timed out (110: Connection timed out) while reading response header from upstream
Means NGINX timed out reading the HTTP response header from upstream. This
#!/bin/bash | |
# You need to uncomment two lines for the script work. | |
# Please check the logic before use it. | |
main () { | |
#aws s3 ls $BUCKETNAME | grep -v ' PRE ' | grep -v ' 0 ' > data.txt | |
UNIXDAYS=$(date -d "$DAYS days ago" +%s) | |
while read LINE | |
do |
Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.
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
# установка пакета openvpn | |
yum install -y epel-release && yum install -y openvpn | |
# включение маршрутизации | |
sysctl -w net.ipv4.ip_forward=1 | |
# правила межсетевого экрана и NAT | |
iptables -F FORWARD | |
iptables -A INPUT -i tun+ -j ACCEPT | |
iptables -A FORWARD -i tun+ -j ACCEPT |
# ОС CentOS 7.x | |
# установка пакета openvpn | |
yum install -y epel-release && yum install -y openvpn | |
# установка пакета easy-rsa | |
yum install -y easy-rsa | |
# генерирование ключей и сертификатов - https://gist.github.com/seugene/c73f44c80ee4fbf1aade | |
# включение маршрутизации |
Old EBS volumes example:
growpart /dev/xvda 1
resize2fs /dev/xvda1
New NVME volumes example:
growpart /dev/nvme0n1 1
resize2fs /dev/nvme0n1p1