meta

what's the meta about say it ditto dot net?

User Tools

Site Tools


servers:caddy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
servers:caddy [2025/08/17 12:52] – removed - external edit (Unknown date) 127.0.0.1servers:caddy [2025/08/17 12:52] (current) – ↷ Page moved from terminal:caddy to servers:caddy melo
Line 1: Line 1:
 +===== caddy notes =====
  
 +==== static site ====
 +
 +<code>https://example.com {
 +        root * "/path/to/dir"
 +        file_server
 +}</code>
 +
 +==== file browse ====
 +
 +<code>https://example.com {
 +    root * "/path/to/dir"
 +    file_server browse
 +}</code>
 +
 +==== file browse: grid default/forced view ====
 +
 +<code>https://example.com {
 +    root * "/path/to/dir"
 +    file_server browse
 +
 +    @directories `path('*/') && {query} == ''`
 +        redir @directories ?layout=grid
 +}</code>
 +    
 +==== reverse proxy ====
 +<code>https://example.com {
 +        reverse_proxy 192.168.1.123:8080
 +}</code>
 +
 +==== reverse proxy with basic auth ====
 +<code>https://example.com {
 +        reverse_proxy 192.168.1.123:8080
 +        basicauth /* {
 +                username basicauth_hash
 +        }
 +
 +}</code>
 +
 +<code bash>htpasswd -nbBC 10 username password_to_be_hashed</code>