File tree Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Caddy
3+ ---
4+
5+ # Caddy
6+
7+ Want to use [ ** caddy** ] ( https://github.com/caddyserver/caddy ) as your ** Reverse Proxy** ?
8+ These instructions will take you through the steps.
9+
10+ ## Prerequisites
11+
12+ Before moving on you must have
13+
14+ - some knowledge of ** caddy**
15+ - already deployed ** caddy**
16+
17+ ## Installation
18+
19+ Create or update your ` Caddyfile ` file and mount it to ` /etc/caddy/Caddyfile ` in your caddy container.
20+
21+ ``` conf
22+ {{{ #://./examples/Caddyfile }}}
23+ ```
24+
25+ Then spin up your stack:
26+
27+ ``` bash
28+ docker compose up -d
29+ ```
Original file line number Diff line number Diff line change 1+ # Replace with your actual domain
2+ domain.com {
3+ # Use whatever network alias you set in the docker-compose file
4+ reverse_proxy secured-signal-api:8880
5+
6+ # Optional: basic security headers
7+ header {
8+ Strict-Transport-Security "max-age=31536000;"
9+ X-Content-Type-Options "nosniff"
10+ X-Frame-Options "DENY"
11+ Referrer-Policy "no-referrer"
12+ }
13+ }
14+
15+ # HTTP redirect to HTTPS
16+ http://domain.com {
17+ redir https:// {host}{uri} permanent
18+ }
Original file line number Diff line number Diff line change 44
55 # Add allowed hostnames which nginx should respond to
66 # `_` for any
7- server_name localhost ;
7+ server_name domain.com ;
88
99 ssl_certificate /etc/nginx/ssl /cert.crt;
1010 ssl_certificate_key /etc/nginx/ssl /cert.key;
@@ -23,6 +23,6 @@ server {
2323# Redirect HTTP to HTTPs
2424server {
2525 listen 80 ;
26- server_name localhost ;
26+ server_name domain.com ;
2727 return 301 https://$host$request_uri ;
2828}
You can’t perform that action at this time.
0 commit comments