Reverse-Proxy: Difference between revisions

From FlowerHouseWiki
No edit summary
No edit summary
Line 42: Line 42:
</syntaxhighlight>
</syntaxhighlight>


<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/<br />
<syntaxhighlight lang="console">
├─ Caddyfile<br />
/home/caddy/
├─ auth/<br />
├─ Caddyfile
│  ├─ local/<br />
├─ auth/
│  │  ├─ users.json<br />
│  ├─ local/
├─ lxc/<br />
│  │  ├─ users.json
│  ├─ 101_adguard<br />
├─ lxc/
│  ├─ 102_reverse_proxy<br />
│  ├─ 101_adguard
│  ├─ ...<br />
│  ├─ 102_reverse_proxy
├─ network<br />
│  ├─ ...
├─ security<br />
├─ network
├─ vm/<br />
├─ security
│  ├─ 200_truenas<br />
├─ vm/
│  ├─ 201_home_assitant<br />
│  ├─ 200_truenas
│  ├─ ...<br />
│  ├─ 201_home_assitant
│  ├─ ...
</syntaxhighlight>


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

Revision as of 23:01, 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
│  ├─ ...