Reverse-Proxy

From FlowerHouseWiki
Revision as of 22:59, 11 February 2023 by Tropaion (talk | contribs)
Reverse-Proxy-LXC
Reverse proxy.png

Network


IP: 192.168.88.3
MAC: 56:59:71:B1:85:BC

System


OS: Debian Bullseye
Files: x
RAM: 1024MB
Cores: 1
Privileged: No

The ReverseProxy is reachable under 192.168.88.3 which is located in the ServerVLAN.

Every incoming packages from outside are forwarded to this IP.

The ReverseProxy also forces outside connections to use HTTPS/SSL and will provide a SSL-Certificate.

Previously Nginx Proxy Manager and Authelia was used for ReverseProxy: Guide

Now Caddy2 is used for the ReverseProxy, because it's more stable and integrated

Caddy Installation

Download Caddy2 with Security Plugin

Copy binary to directory

mv ./caddy_linux_amd64_custom /usr/bin/caddy

Create user and group

addgroup caddy
adduser --system caddy
adduser caddy caddy

Set permissions for binary

chown caddy:caddy /usr/bin/caddy
chmod 770 /usr/bin/caddy

Create caddy file

nano /home/caddy/Caddyfile

In my installation I separated many config files for better overview

/home/caddy/ ├─ Caddyfile ├─ auth/ │ ├─ local/ │ │ ├─ users.json ├─ lxc/ │ ├─ 101_adguard │ ├─ 102_reverse_proxy │ ├─ ... ├─ network ├─ security ├─ vm/ │ ├─ 200_truenas │ ├─ 201_home_assitant │ ├─ ...