Вазух
This commit is contained in:
@ -8,7 +8,7 @@ ssh administrator@10.101.1.3 -p 22
|
||||
```
|
||||
Connect to CCALM Turkish infrastructure:
|
||||
```sh
|
||||
ssh igor@156.244.31.209 -p 2200
|
||||
ssh igor@88.218.94.134 -p 2200
|
||||
```
|
||||
----------------------------------------------------------------------------------------------------
|
||||
## Install haproxy
|
||||
@ -26,29 +26,29 @@ sudo cp /etc/haproxy/haproxy.cfg{,.bak}
|
||||
В конец файла добавляем пока только для перенаправления (для балансироки больше IP адресов):
|
||||
```conf
|
||||
frontend frontend-http
|
||||
bind *:80
|
||||
mode http
|
||||
bind *:80
|
||||
mode http
|
||||
|
||||
# ACL для определения запросов на проверку Let's Encrypt
|
||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||
# ACL для определения запросов на проверку Let's Encrypt
|
||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||
|
||||
# Если это не запрос Let's Encrypt, перенаправляем на HTTPS
|
||||
http-request redirect scheme https code 301 unless is_certbot
|
||||
# Если это не запрос Let's Encrypt, перенаправляем на HTTPS
|
||||
http-request redirect scheme https code 301 unless is_certbot
|
||||
|
||||
# Отправляем запросы Let's Encrypt на backend-certbot
|
||||
use_backend backend-certbot if is_certbot
|
||||
# Отправляем запросы Let's Encrypt на backend-certbot
|
||||
use_backend backend-certbot if is_certbot
|
||||
|
||||
frontend LOADBALANCER-01
|
||||
bind *:80
|
||||
bind *:443 ssl crt /etc/haproxy/ssl/mqtt.kz.pem crt /etc/ssl/certs/bigfoottrade_kz.pem
|
||||
mode http #режим работы HAProxy, в http режиме происходит анализ Layer 7 трафика
|
||||
option httpclose #Закрывает пассивные соединения
|
||||
frontend LOADBALANCER-01
|
||||
bind *:80
|
||||
bind *:443 ssl crt /etc/haproxy/ssl/mqtt.kz.pem crt /etc/ssl/certs/bigfoottrade_kz.pem
|
||||
mode http #режим работы HAProxy, в http режиме происходит анализ Layer 7 трафика
|
||||
option httpclose #Закрывает пассивные соединения
|
||||
|
||||
http-request set-header x-Forwarded-for %[src]
|
||||
http-request set-header x-Forwarded-uri %[url]
|
||||
http-request set-header x-Forwarded-for %[src]
|
||||
http-request set-header x-Forwarded-uri %[url]
|
||||
|
||||
acl v_geoserver2 hdr(host) -i geoserver2.ccalm.org
|
||||
use_backend geoserver2_ccalm_org if v_geoserver2
|
||||
acl v_geoserver2 hdr(host) -i geoserver2.ccalm.org
|
||||
use_backend geoserver2_ccalm_org if v_geoserver2
|
||||
|
||||
#Если различные нестандартные порты то так
|
||||
acl v_locust_kz hdr_reg(host) -i ^locust\.kz(:.*)?$
|
||||
@ -58,13 +58,13 @@ mode http
|
||||
acl v_geo_data hdr(host) -i geoserver2.ccalm.org/data
|
||||
use_backend WEBSERVERS-01 if v_geo_data
|
||||
|
||||
default_backend WEBSERVER
|
||||
|
||||
default_backend WEBSERVERS-01
|
||||
backend WEBSERVER
|
||||
balance roundrobin
|
||||
server web1 127.0.0.1:8080 check inter 5s ssl verify none
|
||||
option httpchk GET /index.html
|
||||
|
||||
backend WEBSERVERS-01
|
||||
balance roundrobin
|
||||
server web10 127.0.0.1:8081 check inter 5s ssl verify none
|
||||
option httpchk
|
||||
|
||||
backend geoserver2_ccalm_org
|
||||
balance roundrobin
|
||||
@ -150,7 +150,7 @@ backend 'transit_monitoring_kz' has no server available!
|
||||
Бесплатный SSL сертификат Let’s Encrypt для HAPROXY https://serversforhackers.com/c/letsencrypt-with-haproxy
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y certbot
|
||||
sudo apt-get install certbot -y
|
||||
````
|
||||
Для удаления PPA нужно выполнить:
|
||||
```sh
|
||||
@ -189,6 +189,9 @@ backend 'transit_monitoring_kz' has no server available!
|
||||
Перезагрузить и выполнить команду:
|
||||
|
||||
```sh
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d powerdns.geovizor.top --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geovizor.top --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d locust.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d gotify.locust.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d git.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
Reference in New Issue
Block a user