Reverse-Proxy: Difference between revisions

From FlowerHouseWiki
No edit summary
No edit summary
Line 43: Line 43:


<p>In my installation I separated many config files for better overview</p>
<p>In my installation I separated many config files for better overview</p>
/home/caddy/
/home/caddy/<br />
├─ Caddyfile
├─ Caddyfile<br />
├─ auth/
├─ auth/<br />
│  ├─ local/
│  ├─ local/<br />
│  │  ├─ users.json
│  │  ├─ users.json<br />
├─ lxc/
├─ lxc/<br />
│  ├─ 101_adguard
│  ├─ 101_adguard<br />
│  ├─ 102_reverse_proxy
│  ├─ 102_reverse_proxy<br />
│  ├─ ...
│  ├─ ...<br />
├─ network
├─ network<br />
├─ security
├─ security<br />
├─ vm/
├─ vm/<br />
│  ├─ 200_truenas
│  ├─ 200_truenas<br />
│  ├─ 201_home_assitant
│  ├─ 201_home_assitant<br />
│  ├─ ...
│  ├─ ...<br />


<p></p>
<p></p>

Revision as of 23:00, 11 February 2023

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
│ ├─ ...