README.md aktualisiert
This commit is contained in:
parent
65b070e441
commit
eb13c89baa
1 changed files with 44 additions and 1 deletions
45
README.md
45
README.md
|
@ -1,6 +1,6 @@
|
||||||
# haproxy-template
|
# haproxy-template
|
||||||
|
|
||||||
short template for certbot dns-01 with renew option (Alpine 3.19 / LXC Proxmox)
|
short template for certbot dns-01 with auto renew (Alpine 3.19 / LXC Proxmox)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -28,3 +28,46 @@ Install haproxy and cloudflare-dns
|
||||||
apk add haproxy certbot@edgecommunity certbot-dns-cloudflare@edgecommunity
|
apk add haproxy certbot@edgecommunity certbot-dns-cloudflare@edgecommunity
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Add custom scripts and default haproxy config
|
||||||
|
```
|
||||||
|
mkdir -p /etc/haproxy && rm /etc/haproxy/haproxy.cfg && mkdir -p /etc/haproxy/ssl
|
||||||
|
wget https://git.hackmi.ch/Phil/haproxy-template/raw/branch/main/haproxy.cfg -O /etc/haproxy/haproxy.cfg
|
||||||
|
wget https://git.hackmi.ch/Phil/haproxy-template/raw/branch/main/genscripts.sh
|
||||||
|
chmod 777 -R /etc/haproxy && chmod 7777 -R genscripts.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Add haproxy to startup and certbot autorenew to weekly
|
||||||
|
```
|
||||||
|
rc-update add haproxy
|
||||||
|
|
||||||
|
cat <<EOF >> /etc/periodic/weekly/certbot-renew
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
certbot renew
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod 777 /etc/periodic/weekly/certbot-renew && chmod +x /etc/periodic/weekly/certbot-renew
|
||||||
|
```
|
||||||
|
|
||||||
|
Add first SSL cert (DNS-Challange) [Cloudflare] [https://developers.cloudflare.com/fundamentals/api/get-started/create-token/]
|
||||||
|
```sh
|
||||||
|
./genscripts.sh domainwithsslredirect.de YOUR-API-TOKEN
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit your haproxy config
|
||||||
|
```sh
|
||||||
|
nano /etc/haproxy/haproxy.cfg
|
||||||
|
|
||||||
|
# Change domainwithsslredirect.de with your url
|
||||||
|
# Change service domainxyz to your desire in frontend https and backend
|
||||||
|
# Adjust server web1 10.10.10.10:80 to your destination
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart or reload haproxy
|
||||||
|
```sh
|
||||||
|
service haproxy restart
|
||||||
|
or
|
||||||
|
service haproxy reload
|
||||||
|
```
|
||||||
|
|
||||||
|
Profit
|
||||||
|
|
Loading…
Reference in a new issue