-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
251 additions
and
307 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,32 @@ | ||
# Listen on port 8081 for HTTP requests | ||
10.0.0.16:8081 { | ||
# Set the root directory for serving files, such as certificates | ||
# Serve files at 10.0.2.16:8081 for browsing | ||
10.0.2.16:8081 { | ||
root * /absolute/path/to/storage/pki/authorities/local | ||
|
||
# Enable file server to serve static files like root.crt | ||
handle_path /certs/* { | ||
file_server browse | ||
} | ||
|
||
# Reverse proxy configuration for PocketBase | ||
handle { | ||
reverse_proxy 127.0.0.1:8090 { | ||
transport http { | ||
read_timeout 360s | ||
} | ||
} | ||
} | ||
|
||
# Logging setup | ||
log { | ||
output file /absolute/path/to/storage/caddy_debug.log { | ||
roll_size 5MiB | ||
roll_keep 10 | ||
roll_keep_for 720h | ||
} | ||
# Enable logging with a dedicated log path for certs access | ||
log certs { | ||
output file /path/to/logs/certs_access.log | ||
format json | ||
} | ||
} | ||
|
||
# HTTPS server block for serving PocketBase via HTTPS | ||
10.0.2.16:8443 { | ||
# Enable TLS with automatic certificates (use internal certificates for testing) | ||
# Reverse proxy at 10.0.2.16:55000 with TLS internal | ||
10.0.2.16:55000 { | ||
tls internal | ||
|
||
# Set up reverse proxy for HTTPS | ||
# Reverse proxy configuration with health checks | ||
reverse_proxy 127.0.0.1:8090 { | ||
transport http { | ||
read_timeout 360s | ||
} | ||
health_interval 10s | ||
health_timeout 2s | ||
health_uri /health | ||
} | ||
|
||
# Logging setup for HTTPS server | ||
log { | ||
output file /absolute/path/to/storage/caddy_https_debug.log { | ||
roll_size 5MiB | ||
roll_keep 10 | ||
roll_keep_for 720h | ||
} | ||
# Enable logging with a dedicated log path for the proxy | ||
log pb_proxy { | ||
output file /path/to/logs/proxy_access.log | ||
format json | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.