mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 22:16:15 -04:00
New Website: Phase I (#357)
* Initial commit; starting new design Dropdown menu * Begin docs layout of new design * Get themes under control; button hover splash * Some basic responsiveness * Finish responsive layout; several bug fixes * Avoid flash during color scheme change * Begin building top of homepage * docs: Start building quick-assist feature * Work on homepage a little more * Keep working on homepage * More homepage progress * Some sponsor SVGs * Add sponsor features * Implement basic Sponsor Experience box * Reorganize some styles * WIP sponsors page * Start features page WIP * Minor improvements * Fix headings; work on features page * WIP features page * Continue work on marketing pages * Continue work on features page * More features WIP * Continue features page... * More work on features page * Keeping going :) * Continue home and features pages * More homepage/features content, screenshots, tweaks * Minor fixes to features page * Minor tweaks * Work on testimonials * Work on homepage more * More homepage work * Continue work on homepage * Add some sponsor logos * Some citation screenshots * Add citations * Start making homepage responsive * Re-add cache busting Fix docs * Use markdown syntax highlighting on frontpage * Rework AJQuery to $_ to not interfere with jQuery * Rewrite quick assist with AlpineJS, use markdown for contents * More work on marketing pages * Rebase and fix code displays * Syntax highlight on-demand example, fix rollover * Adjust on-demand demo * Work on responsiveness * Keep working on responsiveness * Mainly finish making design responsive * Thiccer favicon * More work on marketing pages * Keep on going * Fix link * Move new site into src folder * Add open graph image * Add recorded demo for homepage * Tweak caption * Fix Poppins font for now * Minor tweaks * Trim demo ending * Remove unfinished pages Also update Framer logo --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
This commit is contained in:
parent
5bb6d92c63
commit
07c51663ab
191 changed files with 13008 additions and 4970 deletions
|
@ -1,8 +0,0 @@
|
|||
{{define "account-head"}}
|
||||
{{import "/includes/head.html"}}
|
||||
{{template "head"}}
|
||||
<link rel="stylesheet" href="/resources/css/account/common.css{{template "cacheBust"}}">
|
||||
<script src="/resources/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="/resources/js/sweetalert.min.js"></script>
|
||||
<script src="/resources/js/account/common.js{{template "cacheBust"}}"></script>
|
||||
{{end}}
|
|
@ -1,16 +0,0 @@
|
|||
<nav>
|
||||
<div class="logo-container">
|
||||
<img src="/resources/images/caddy-lock.png" alt="Caddy Portal" title="Caddy Portal" class="logo">
|
||||
<br>
|
||||
<b>Portal</b>
|
||||
<br>
|
||||
<span class="help beta" title="Still experimental; subject to change or reset. Thanks for your patience and understanding.">(beta)</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="/account/">🎛 Dashboard</a></li>
|
||||
<li><a href="/account/register-package">📦 Register Package</a></li>
|
||||
<li><a href="/account/logout">🔒 Log Out</a></li>
|
||||
<br>
|
||||
<li><a href="/">⬅️ Main Site</a></li>
|
||||
</ul>
|
||||
</nav>
|
|
@ -1,18 +0,0 @@
|
|||
<div>
|
||||
<div class="nonstandard-notice">
|
||||
<b>This module does not come with Caddy.</b> It can be added by using <b><a href="/docs/build#xcaddy">xcaddy</a></b> or our <b><a href="/download">download page</a></b>. Non-standard modules may be developed by the community and are not officially endorsed or maintained by the Caddy project. The documentation is shown here only as a courtesy.
|
||||
<br><br>
|
||||
<b>Code repository: <a href="javascript:" class="nonstandard-project-link"></a></b>
|
||||
<br><br>
|
||||
<b>Custom builds:</b> <code class="bash">xcaddy build --with <span class="nonstandard-package-path"></span></code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 id="docs">Description</h2>
|
||||
<div class="top-doc">
|
||||
<!--Populated by JS-->
|
||||
</div>
|
||||
<h2 class="field-list-header">Field List</h2>
|
||||
<dl class="field-list-contents">
|
||||
<!--Populated by JS-->
|
||||
</dl>
|
|
@ -1,13 +0,0 @@
|
|||
{{define "docs-head"}}
|
||||
{{import "/includes/head.html"}}
|
||||
{{template "head"}}
|
||||
<link rel="stylesheet" href="/resources/css/docs.css{{template "cacheBust"}}">
|
||||
<link rel="stylesheet" href="/resources/css/chroma.css{{template "cacheBust"}}">
|
||||
{{$directives := list }}
|
||||
{{range $i, $file := (listFiles "/docs/markdown/caddyfile/directives")}}
|
||||
{{$directives = append $directives ($file | trimSuffix ".md")}}
|
||||
{{end}}
|
||||
<script type="text/javascript">window.CaddyfileDirectives = {{$directives | toJson}};</script>
|
||||
<script src="/resources/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="/resources/js/docs.js{{template "cacheBust"}}"></script>
|
||||
{{end}}
|
|
@ -1,12 +0,0 @@
|
|||
<header>
|
||||
<div id="logo-container">
|
||||
<div id="logo-docs-container">
|
||||
<a href="/"><img src="/resources/images/caddy-logo.svg" id="logo" alt="Caddy"></a>
|
||||
<div id="logo-docs">Documentation</div>
|
||||
</div>
|
||||
<div id="zerossl-project">
|
||||
a <a href="https://zerossl.com"><img src="/resources/images/zerossl-logo.svg" id="zerossl-logo"></a> project
|
||||
</div>
|
||||
</div>
|
||||
{{include "/includes/header-nav.html"}}
|
||||
</header>
|
|
@ -1,14 +0,0 @@
|
|||
<div id="hovercard" class="arrow-box">
|
||||
<div id="hovercard-docs" class="hovercard-elem"><!--Populated by JS--></div>
|
||||
<div id="hovercard-module" class="hovercard-elem">
|
||||
<p id="hovercard-namespace-box">
|
||||
Fulfilled by modules in namespace: <span id="hovercard-namespace"><!--Populated by JS--></span>
|
||||
</p>
|
||||
<div id="hovercard-module-list"><!--Populated by JS--></div>
|
||||
</div>
|
||||
<div id="hovercard-inline-key" class="hovercard-elem">
|
||||
<p class="explain">This property is <b>required</b> because it specifies the module name.</p>
|
||||
</div>
|
||||
<div id="hovercard-breadcrumb-siblings" class="hovercard-elem"><!--Populated by JS--></div>
|
||||
<div id="hovercard-inline-link" class="hovercard-elem"><!--Populated by JS--></div>
|
||||
</div>
|
|
@ -1,64 +0,0 @@
|
|||
<nav class="sidebar">
|
||||
<ul>
|
||||
<li><a href="/docs/">Welcome</a></li>
|
||||
<li><a href="https://caddy.community/c/wiki/13">Wiki <img src="/resources/images/external-link.svg"></a></li>
|
||||
|
||||
<li class="heading">Get Caddy</li>
|
||||
<li><a href="/docs/install">Install</a></li>
|
||||
<li><a href="/docs/build">Build from source</a></li>
|
||||
|
||||
<li class="heading">Tutorials</li>
|
||||
<li><a href="/docs/getting-started">Getting Started</a></li>
|
||||
<li>
|
||||
<a href="/docs/quick-starts">Quick-starts</a>
|
||||
<ul>
|
||||
<li><a href="/docs/quick-starts/api">Using the API</a></li>
|
||||
<li><a href="/docs/quick-starts/caddyfile">Using a Caddyfile</a></li>
|
||||
<li><a href="/docs/quick-starts/static-files">Static files</a></li>
|
||||
<li><a href="/docs/quick-starts/reverse-proxy">Reverse proxy</a></li>
|
||||
<li><a href="/docs/quick-starts/https">HTTPS</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/docs/api-tutorial">Caddy API</a></li>
|
||||
<li><a href="/docs/caddyfile-tutorial">Caddyfile</a></li>
|
||||
|
||||
<li class="heading">Reference</li>
|
||||
<li><a href="/docs/command-line">Command Line</a></li>
|
||||
<li><a href="/docs/api">API</a></li>
|
||||
<li>
|
||||
<a href="/docs/caddyfile">Caddyfile</a>
|
||||
<ul>
|
||||
<li><a href="/docs/caddyfile/concepts">Concepts</a></li>
|
||||
<li><a href="/docs/caddyfile/directives">Directives</a></li>
|
||||
<li><a href="/docs/caddyfile/matchers">Request matchers</a></li>
|
||||
<li><a href="/docs/caddyfile/options">Global options</a></li>
|
||||
<li><a href="/docs/caddyfile/patterns">Common patterns</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/docs/modules/">Modules</a></li>
|
||||
<li><a href="/docs/json/">JSON Config Structure</a></li>
|
||||
<li><a href="/docs/automatic-https">Automatic HTTPS</a></li>
|
||||
|
||||
<li class="heading">Articles</li>
|
||||
<li><a href="/docs/architecture">Caddy Architecture</a></li>
|
||||
<li><a href="/docs/conventions">Conventions</a></li>
|
||||
<li><a href="/docs/config-adapters">Config Adapters</a></li>
|
||||
<li><a href="/docs/running">Keep Caddy Running</a></li>
|
||||
<li><a href="/docs/logging">How Logging Works</a></li>
|
||||
<li><a href="/docs/metrics">Monitoring Caddy</a></li>
|
||||
<li><a href="/docs/signature-verification">Verifying Asset Signatures</a></li>
|
||||
<li><a href="/docs/v2-upgrade">Upgrading to Caddy 2</a></li>
|
||||
|
||||
<li class="heading">Developers</li>
|
||||
<li>
|
||||
<a href="/docs/extending-caddy">Extending Caddy</a>
|
||||
<ul>
|
||||
<li><a href="/docs/extending-caddy/caddyfile">Caddyfile Support</a></li>
|
||||
<li><a href="/docs/extending-caddy/config-adapters">Config Adapters</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/docs/extending-caddy/namespaces">Module Namespaces</a></li>
|
||||
<br>
|
||||
<li><a href="/caddy-v1-docs-archive.tar.gz">v1 Docs <img src="/resources/images/external-link.svg"></a></li>
|
||||
</ul>
|
||||
</nav>
|
|
@ -1 +0,0 @@
|
|||
<pre><code class="json renderbox"><!--Populated by JS--></code></pre>
|
24
src/includes/examples/custom-ca.md
Normal file
24
src/includes/examples/custom-ca.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
<div class="ex-custom-ca">
|
||||
|
||||
```caddy
|
||||
{
|
||||
pki {
|
||||
ca corporate {
|
||||
name "Our Corporation Authority"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal.example.com {
|
||||
# ACME endpoint: /acme/corporate/directory
|
||||
acme_server {
|
||||
ca corporate
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.$_('.ex-custom-ca code').classList.add('light');
|
||||
</script>
|
63
src/includes/examples/file-server.md
Normal file
63
src/includes/examples/file-server.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
<script>
|
||||
ready(() => {
|
||||
let startElement, endElement;
|
||||
|
||||
startElement = findWithContent('.ex-fs pre.chroma code span.line', 'file_server /downloads/* {');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-compress rollover-blue');
|
||||
|
||||
startElement = findWithContent('.ex-fs pre.chroma code span', 'encode');
|
||||
endElement = findNextText(startElement, 'gzip');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-compress rollover-blue');
|
||||
|
||||
startElement = findWithContent('.ex-fs pre.chroma code span.line', 'file_server /database/* {');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-vfs rollover-green');
|
||||
|
||||
startElement = findWithContent('.ex-fs pre.chroma code span.line', 'file_server /embedded/* {');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-vfs rollover-green');
|
||||
|
||||
startElement = findWithContent('.ex-fs pre.chroma code span', '# (Range/Etag/etc. all work without extra config)');
|
||||
wrapRangeWithSpan(startElement, startElement, 'rollover-range rollover-yellow');
|
||||
|
||||
startElement = findWithContent('.ex-fs pre.chroma code span', 'file_server');
|
||||
endElement = findNextText(startElement, 'browse');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-browse rollover-purple');
|
||||
|
||||
window.$_('.ex-fs code').classList.add('light');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="ex-fs">
|
||||
|
||||
```caddy
|
||||
example.com
|
||||
|
||||
root * /var/www
|
||||
|
||||
# Serve precompressed files if present
|
||||
file_server /downloads/* {
|
||||
precompressed gzip zstd br
|
||||
}
|
||||
|
||||
# Compress everything else that would benefit
|
||||
encode zstd gzip
|
||||
|
||||
# Static site using database as file system
|
||||
file_server /database/* {
|
||||
fs sqlite data.sql
|
||||
}
|
||||
|
||||
# Static site embedded within the Caddy binary
|
||||
file_server /embedded/* {
|
||||
fs embedded
|
||||
}
|
||||
|
||||
# (Range/Etag/etc. all work without extra config)
|
||||
|
||||
# Serve static site with directory listings
|
||||
file_server browse
|
||||
```
|
||||
|
||||
</div>
|
22
src/includes/examples/json-automate-certs.md
Normal file
22
src/includes/examples/json-automate-certs.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div class="ex-json-automate-certs">
|
||||
|
||||
```json
|
||||
{
|
||||
"apps": {
|
||||
"tls": {
|
||||
"certificates": {
|
||||
"automate": [
|
||||
"example.com",
|
||||
"sub.example.com",
|
||||
"example.net"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</div>
|
||||
<script>
|
||||
window.$_('.ex-json-automate-certs code').classList.add('light');
|
||||
</script>
|
21
src/includes/examples/local-https.md
Normal file
21
src/includes/examples/local-https.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
<div class="ex-local-https">
|
||||
|
||||
```caddy
|
||||
localhost {
|
||||
respond "Hello from HTTPS!"
|
||||
}
|
||||
|
||||
192.168.1.10 {
|
||||
respond "Also HTTPS!"
|
||||
}
|
||||
|
||||
http://localhost {
|
||||
respond "Plain HTTP"
|
||||
}
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.$_('.ex-local-https code').classList.add('light');
|
||||
</script>
|
36
src/includes/examples/on-demand.md
Normal file
36
src/includes/examples/on-demand.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
<script>
|
||||
ready(() => {
|
||||
let startElement, endElement;
|
||||
|
||||
startElement = findWithContent('.ex-on-demand pre.chroma code span.line', 'on_demand_tls {');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-abuse rollover-purple');
|
||||
|
||||
startElement = findWithContent('.ex-on-demand pre.chroma code span.line', 'tls');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-ondemand rollover-green');
|
||||
|
||||
window.$_('.ex-on-demand code').classList.add('light');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="ex-on-demand">
|
||||
|
||||
```caddy
|
||||
{
|
||||
on_demand_tls {
|
||||
ask http://localhost:9123/check
|
||||
}
|
||||
}
|
||||
|
||||
https:// {
|
||||
tls {
|
||||
on_demand
|
||||
}
|
||||
# reverse_proxy, etc...
|
||||
}
|
||||
|
||||
# other sites...
|
||||
```
|
||||
|
||||
</div>
|
53
src/includes/examples/proxy.md
Normal file
53
src/includes/examples/proxy.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
<script>
|
||||
ready(() => {
|
||||
let startElement, endElement;
|
||||
|
||||
startElement = findWithContent('.ex-proxy pre.chroma code span', 'php_fastcgi');
|
||||
endElement = findNextText(startElement, '9000');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-php rollover-green');
|
||||
|
||||
startElement = findWithContent('.ex-proxy pre.chroma code span.line', 'reverse_proxy /api/* {');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-dynamic-backends rollover-purple');
|
||||
|
||||
startElement = findWithContent('.ex-proxy pre.chroma code span.line', 'reverse_proxy /service/* {');
|
||||
endElement = findNextText(startElement, '}');
|
||||
wrapRangeWithSpan(startElement, endElement, 'rollover-ha rollover-blue');
|
||||
|
||||
window.$_('.ex-proxy code').classList.add('dark');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="ex-proxy">
|
||||
|
||||
```caddy
|
||||
example.com
|
||||
|
||||
# Serve PHP sites
|
||||
handle /blog/* {
|
||||
root * /var/www/wordpress
|
||||
php_fastcgi localhost:9000
|
||||
file_server
|
||||
}
|
||||
|
||||
# Proxy an autoscaling API with dynamic backends
|
||||
reverse_proxy /api/* {
|
||||
dynamic srv _api._tcp.example.com
|
||||
}
|
||||
|
||||
# Proxy a compute-heavy distributed service
|
||||
# with load balancing and health checks
|
||||
reverse_proxy /service/* {
|
||||
to 10.0.1.1:80 10.0.1.2:80 10.0.1.3:80
|
||||
lb_policy least_conn
|
||||
lb_try_duration 10s
|
||||
fail_duration 5s
|
||||
}
|
||||
|
||||
# Proxy everything else to an HTTPS upstream
|
||||
reverse_proxy https://service.example.com {
|
||||
header_up Host {upstream_hostport}
|
||||
}
|
||||
```
|
||||
|
||||
</div>
|
23
src/includes/examples/website-caddyfile.md
Normal file
23
src/includes/examples/website-caddyfile.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
<div class="ex-website-caddyfile">
|
||||
|
||||
```caddy
|
||||
caddyserver.com
|
||||
|
||||
root * src
|
||||
|
||||
file_server
|
||||
templates # markdown & syntax highlighting!
|
||||
encode zstd gzip
|
||||
|
||||
redir /docs/json /docs/json/
|
||||
rewrite /docs/json/* /docs/json/index.html
|
||||
rewrite /docs/* /docs/index.html
|
||||
|
||||
reverse_proxy /api/* localhost:9002
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.$_('.ex-website-caddyfile code').classList.add('light');
|
||||
</script>
|
|
@ -1,24 +1,49 @@
|
|||
<div class="wrapper">
|
||||
<footer>
|
||||
<div>
|
||||
<img src="/resources/images/caddy-logo.svg" alt="Caddy" id="footer-logo">
|
||||
An <a href="https://github.com/caddyserver/caddy">open source</a> Go community project
|
||||
<footer>
|
||||
<div class="wrapper">
|
||||
<div class="logo-area">
|
||||
<img src="/resources/images/logo-dark.svg" class="logo" alt="Caddy web server">
|
||||
<p>
|
||||
A free <a href="https://github.com/caddyserver/caddy">open source</a> project
|
||||
that relies on <a href="/sponsor">sponsors</a>.
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://usefathom.com/ref/AUKNWU">Privacy-respecting analytics</a> by Fathom
|
||||
</p>
|
||||
<br>
|
||||
in partnership with <a href="https://www.ardanlabs.com/">Ardan Labs</a>
|
||||
<br>
|
||||
<small><a href="https://usefathom.com/ref/AUKNWU">Privacy-respecting analytics by Fathom</a></small>
|
||||
<p>
|
||||
© {{now | date "2006"}} ZeroSSL. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
© {{now | date "2006"}} ZeroSSL. All rights reserved.
|
||||
<br>
|
||||
Caddy® is a registered trademark of ZeroSSL GmbH.
|
||||
<div class="link-col">
|
||||
<div class="col-header">Project</div>
|
||||
<a href="/features">Features</a>
|
||||
<a href="/download">Download</a>
|
||||
<a href="/docs">Documentation</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Fathom - beautiful, simple website analytics -->
|
||||
<script src="https://cdn.usefathom.com/script.js" site="GVMGKAKP" honor-dnt="true" defer></script>
|
||||
<!-- / Fathom -->
|
||||
|
||||
<!-- Algolia DocSearch -->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
|
||||
<div class="link-col">
|
||||
<div class="col-header">Business services</div>
|
||||
<a href="/support">Support</a>
|
||||
<a href="/sponsor">Sponsorships</a>
|
||||
</div>
|
||||
<div class="link-col">
|
||||
<div class="col-header">Community</div>
|
||||
<a href="https://caddy.community">Forum</a>
|
||||
<a href="https://github.com/caddyserver">GitHub</a>
|
||||
<a href="https://twitter.com/caddyserver">Twitter / X</a>
|
||||
<a href="https://scholar.google.com/scholar?q=caddy+web+server">Research</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper nostalgia">
|
||||
<p>Caddy supports an open Web that promotes privacy, preserves data ownership, fosters innovation, freely allows varieties of client software, and safeguards human sanctity.</p>
|
||||
<div class="nostalgia-badges">
|
||||
<img src="/resources/images/nostalgia/get.gif" title="Honoring early Web clients">
|
||||
<img src="/resources/images/nostalgia/microsoft-ie.gif" title="Honoring early Web clients">
|
||||
<img src="/resources/images/nostalgia/now_anim.gif" title="Honoring early Web clients">
|
||||
<div class="w3c">
|
||||
<img src="/resources/images/nostalgia/valid_html5_yellow.png" title="This site uses HTML 5">
|
||||
<img src="/resources/images/nostalgia/valid_css3_blue.png" title="This site uses CSS 3">
|
||||
</div>
|
||||
<div title="Don't forget to sign our guestbook!">{{ maybe "hitCounter" .OriginalReq.URL.Path }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
|
@ -9,33 +9,36 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin />
|
||||
|
||||
<link rel="icon" href="/resources/images/favicon.png{{template "cacheBust"}}">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:400,700|Maven+Pro:400,700,900|Montserrat:400,700|PT+Mono&display=swap">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Gantari:wght@400..800&family=Figtree:wght@300..900&&family=JetBrains+Mono:wght@400..600&family=Inter:wght@400..600&family=Poppins:wght@400;500;600;700;800&family=Albert+Sans:wght@400..600&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="/resources/css/common.css{{template "cacheBust"}}">
|
||||
<link rel="stylesheet" href="/resources/css/chroma.css{{template "cacheBust"}}">
|
||||
|
||||
<script src="/resources/js/lib.js{{template "cacheBust"}}"></script>
|
||||
<script src="/resources/js/common.js{{template "cacheBust"}}"></script>
|
||||
|
||||
<!-- General metatags -->
|
||||
<meta name="author" content="Caddy Web Server">
|
||||
<meta name="description" content="Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go">
|
||||
<meta name="theme-color" content="#5ea9a2">
|
||||
<meta name="theme-color" content="#1b3143">
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://caddyserver.com/">
|
||||
<meta property="og:url" content="https://{{.Req.Host}}/">
|
||||
<meta property="og:description" content="Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go">
|
||||
<meta property="og:image" content="https://caddyserver.com/resources/images/caddy-open-graph.jpg">
|
||||
<meta property="og:image" content="https://{{.Req.Host}}/resources/images/open-graph-square.png">
|
||||
|
||||
<!-- Twitter card tags additive with the og: tags -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:domain" value="caddyserver.com">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:domain" value="{{.Req.Host}}">
|
||||
<meta name="twitter:site" value="@caddyserver">
|
||||
<meta name="twitter:description" value="Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go">
|
||||
<meta name="twitter:image" content="https://caddyserver.com/resources/images/caddy-open-graph.jpg">
|
||||
<meta name="twitter:url" value="https://caddyserver.com/">
|
||||
|
||||
<!-- Algolia DocSearch -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
|
||||
<meta name="twitter:image" content="https://{{.Req.Host}}/resources/images/open-graph-square.png{{template "cacheBust"}}">
|
||||
<meta name="twitter:url" value="https://{{.Req.Host}}{{.OriginalReq.URL}}">
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics (ZeroSSL) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2DLB04LK4P"></script>
|
||||
|
@ -45,8 +48,4 @@
|
|||
gtag('js', new Date());
|
||||
gtag('config', 'G-2DLB04LK4P');
|
||||
</script>
|
||||
|
||||
<!-- Alpine.js to augment markdown docs -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@alpinejs/persist@3.x.x/dist/cdn.min.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
|
||||
{{end}}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<!--TODO: add class="current" to the current link-->
|
||||
<nav>
|
||||
<div id="search"></div>
|
||||
<a href="/v2">v2 <span class="new">new</span></a>
|
||||
<a href="/download">Download</a>
|
||||
<a href="/docs/">Documentation</a>
|
||||
<a href="https://caddy.community">Forum</a>
|
||||
<a href="https://github.com/caddyserver/caddy">GitHub</a>
|
||||
<a href="/account/">Account</a>
|
||||
<a href="/business" class="red button">For business</a>
|
||||
</nav>
|
208
src/includes/header.html
Normal file
208
src/includes/header.html
Normal file
|
@ -0,0 +1,208 @@
|
|||
<header class="{{index .Args 0}}">
|
||||
<div class="topbar">
|
||||
<div class="wrapper">
|
||||
<a href="https://zerossl.com">
|
||||
A ZeroSSL Project
|
||||
</a>
|
||||
<a href="https://store.caddyserver.com">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-building-store" width="24" height="24"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M3 21l18 0" />
|
||||
<path d="M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4" />
|
||||
<path d="M5 21l0 -10.15" />
|
||||
<path d="M19 21l0 -10.15" />
|
||||
<path d="M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4" />
|
||||
</svg>
|
||||
Store
|
||||
</a>
|
||||
<a href="https://github.com/caddyserver/caddy">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"></path>
|
||||
</svg>
|
||||
GitHub
|
||||
</a>
|
||||
<a href="javascript:nextTheme();">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brightness-half" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M12 9a3 3 0 0 0 0 6v-6z"></path>
|
||||
<path d="M6 6h3.5l2.5 -2.5l2.5 2.5h3.5v3.5l2.5 2.5l-2.5 2.5v3.5h-3.5l-2.5 2.5l-2.5 -2.5h-3.5v-3.5l-2.5 -2.5l2.5 -2.5z"></path>
|
||||
</svg>
|
||||
<span>Theme: <span id="current-theme">System</span></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar wrapper">
|
||||
<a href="/" class="logo-link">
|
||||
<img src="/resources/images/logo-light.svg" class="logo" id="logo-light" alt="Caddy web server">
|
||||
<img src="/resources/images/logo-dark.svg" class="logo" id="logo-dark" alt="Caddy web server">
|
||||
</a>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
<ul>
|
||||
<li class="dropdown-trigger">
|
||||
<a href="/docs/">Documentation</a>
|
||||
<!--
|
||||
<div class="dropdown">
|
||||
<div class="row flatlinks">
|
||||
<a href="/docs/install">
|
||||
<b>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-server-bolt" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"></path>
|
||||
<path d="M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12"></path>
|
||||
<path d="M7 8v.01"></path>
|
||||
<path d="M7 16v.01"></path>
|
||||
<path d="M20 15l-2 3h3l-2 3"></path>
|
||||
</svg>
|
||||
Install
|
||||
</b>
|
||||
Various ways to install Caddy on your computer or server
|
||||
</a>
|
||||
<a href="/docs/install">
|
||||
<b>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-text" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4"></path>
|
||||
<path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path>
|
||||
<path d="M9 9l1 0"></path>
|
||||
<path d="M9 13l6 0"></path>
|
||||
<path d="M9 17l6 0"></path>
|
||||
</svg>
|
||||
Caddyfile
|
||||
</b>
|
||||
A simplified, human-friendly configuration format
|
||||
</a>
|
||||
<a href="/docs/install">
|
||||
<b>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-code" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4"></path>
|
||||
<path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path>
|
||||
<path d="M10 13l-1 2l1 2"></path>
|
||||
<path d="M14 13l1 2l-1 2"></path>
|
||||
</svg>
|
||||
JSON
|
||||
</b>
|
||||
Powerful and programmable native config format
|
||||
</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="linkbox">
|
||||
<div class="col">
|
||||
<div class="links-header">Tutorials</div>
|
||||
<a href="javascript:">Caddy basics</a>
|
||||
<a href="javascript:">Static files</a>
|
||||
<a href="javascript:">Reverse proxy</a>
|
||||
<a href="javascript:">Troubleshooting</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="links-header">Reference</div>
|
||||
<a href="javascript:">Command line</a>
|
||||
<a href="javascript:">Caddyfile</a>
|
||||
<a href="javascript:">API</a>
|
||||
<a href="javascript:">JSON Config</a>
|
||||
<a href="javascript:">Auto HTTPS</a>
|
||||
</div>
|
||||
<!-- <div class="col">
|
||||
<div class="links-header">Caddyfile</div>
|
||||
<a href="javascript:">Directives</a>
|
||||
<a href="javascript:">Request matchers</a>
|
||||
<a href="javascript:">Global options</a>
|
||||
</div> -- >
|
||||
<div class="col">
|
||||
<div class="links-header">Develop</div>
|
||||
<a href="javascript:">Architecture</a>
|
||||
<a href="javascript:">Contribute</a>
|
||||
<a href="javascript:">Write a module</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="links-header">Articles</div>
|
||||
<a href="javascript:">Logging</a>
|
||||
<a href="javascript:">Monitoring</a>
|
||||
<a href="javascript:">Security</a>
|
||||
<a href="javascript:">Custom domains</a>
|
||||
<a href="javascript:">All articles...</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Make a new linkbox div for a separate section. -- >
|
||||
</div>
|
||||
<div class="row featured">
|
||||
<a href="/docs/install">
|
||||
<b>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-atom-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"></path>
|
||||
<path d="M12 21l0 .01"></path>
|
||||
<path d="M3 9l0 .01"></path>
|
||||
<path d="M21 9l0 .01"></path>
|
||||
<path d="M8 20.1a9 9 0 0 1 -5 -7.1"></path>
|
||||
<path d="M16 20.1a9 9 0 0 0 5 -7.1"></path>
|
||||
<path d="M6.2 5a9 9 0 0 1 11.4 0"></path>
|
||||
</svg>
|
||||
Examples
|
||||
</b>
|
||||
Learn from examples contributed by the community
|
||||
</a>
|
||||
<a href="/docs/install">
|
||||
<b>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-message-circle-question" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M15.02 19.52c-2.341 .736 -5 .606 -7.32 -.52l-4.7 1l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c1.649 1.407 2.575 3.253 2.742 5.152"></path>
|
||||
<path d="M19 22v.01"></path>
|
||||
<path d="M19 19a2.003 2.003 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483"></path>
|
||||
</svg>
|
||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-help-hexagon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M19.875 6.27c.7 .398 1.13 1.143 1.125 1.948v7.284c0 .809 -.443 1.555 -1.158 1.948l-6.75 4.27a2.269 2.269 0 0 1 -2.184 0l-6.75 -4.27a2.225 2.225 0 0 1 -1.158 -1.948v-7.285c0 -.809 .443 -1.554 1.158 -1.947l6.75 -3.98a2.33 2.33 0 0 1 2.25 0l6.75 3.98h-.033z"></path>
|
||||
<path d="M12 16v.01"></path>
|
||||
<path d="M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483"></path>
|
||||
</svg> -- >
|
||||
FAQ
|
||||
</b>
|
||||
Get fast answers to common questions
|
||||
</a>
|
||||
<a href="/docs/install">
|
||||
<b>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hexagons" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M4 18v-5l4 -2l4 2v5l-4 2z"></path>
|
||||
<path d="M8 11v-5l4 -2l4 2v5"></path>
|
||||
<path d="M12 13l4 -2l4 2v5l-4 2l-4 -2"></path>
|
||||
</svg>
|
||||
Modules
|
||||
</b>
|
||||
The official list of registered Caddy plugins
|
||||
</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="plainbox">
|
||||
<a href="javascript:">Documentation index</a>
|
||||
<a href="javascript:">Community wiki</a>
|
||||
<a href="javascript:">Contribute to docs</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</li>
|
||||
<li>
|
||||
<a href="/features">Features</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/account">Account</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/support">Support</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="actions">
|
||||
<a href="/download" class="button primary">Download</a>
|
||||
<a href="/sponsor" class="button purple">Sponsor</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
136
src/includes/quick-assist/content.md
Normal file
136
src/includes/quick-assist/content.md
Normal file
|
@ -0,0 +1,136 @@
|
|||
<!--
|
||||
All the markdown content is hidden by default, and loaded by ID.
|
||||
The HTML ID should start with qa-content- followed by the state ID.
|
||||
Make sure to leave empty lines after the opening of the div and before the end,
|
||||
otherwise the markdown parsing will not work.
|
||||
-->
|
||||
|
||||
<div id="qa-content-install_dpkg">
|
||||
|
||||
<pre><code class="cmd"><span class="bash">sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https</span>
|
||||
<span class="bash">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg</span>
|
||||
<span class="bash">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list</span>
|
||||
<span class="bash">sudo apt update</span>
|
||||
<span class="bash">sudo apt install caddy</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_rpm">
|
||||
|
||||
<pre><code class="cmd"><span class="bash">dnf install 'dnf-command(copr)'</span>
|
||||
<span class="bash">dnf copr enable @caddy/caddy</span>
|
||||
<span class="bash">dnf install caddy</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_arch">
|
||||
|
||||
<pre><code class="cmd"><span class="bash">pacman -Syu caddy</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_mac">
|
||||
|
||||
<pre><code class="cmd bash">brew install caddy</code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_windows">
|
||||
|
||||
<p>Chocolatey:</p> <pre><code class="cmd">choco install caddy</code></pre>
|
||||
<p>Scoop:</p> <pre><code class="cmd">scoop install caddy</code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_nix">
|
||||
|
||||
- Package name: [`caddy`](https://search.nixos.org/packages?channel=unstable&show=caddy&query=caddy)
|
||||
- NixOS module: [`services.caddy`](https://search.nixos.org/options?channel=unstable&show=services.caddy.enable&query=services.caddy)
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_android">
|
||||
|
||||
In Termux: <pre><code class="cmd">pkg install caddy</code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_other">
|
||||
|
||||
<h4>Webi</h2>
|
||||
<p>Linux and macOS:</p>
|
||||
<pre><code class="cmd bash">curl -sS https://webi.sh/caddy | sh</code></pre>
|
||||
<p>Windows:</p>
|
||||
<pre><code class="cmd">curl.exe https://webi.ms/caddy | powershell</code></pre>
|
||||
<h4>Ansible</h4>
|
||||
<pre><code class="cmd bash">ansible-galaxy install nvjacobo.caddy</code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_docker">
|
||||
|
||||
<pre><code class="cmd bash">docker pull caddy</code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_build">
|
||||
|
||||
Make sure to have `git` and the latest version of [Go](https://go.dev) installed.
|
||||
|
||||
<pre><code class="cmd"><span class="bash">git clone "https://github.com/caddyserver/caddy.git"</span>
|
||||
<span class="bash">cd caddy/cmd/caddy/</span>
|
||||
<span class="bash">go build</span></code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_with_plugins">
|
||||
|
||||
|
||||
[`xcaddy`](https://github.com/caddyserver/xcaddy) is a command line tool that helps you build Caddy with plugins. A basic build looks like:
|
||||
|
||||
<pre><code class="cmd bash">xcaddy build</code></pre>
|
||||
|
||||
To build with plugins, use `--with`:
|
||||
|
||||
<pre><code class="cmd bash">xcaddy build \
|
||||
--with github.com/caddyserver/nginx-adapter
|
||||
--with github.com/caddyserver/ntlm-transport@v0.1.1</code></pre>
|
||||
|
||||
</div>
|
||||
<div id="qa-content-install_binary">
|
||||
|
||||
1. Obtain a Caddy binary:
|
||||
- [from releases on GitHub](https://github.com/caddyserver/caddy/releases) (expand "Assets")
|
||||
- Refer to [Verifying Asset Signatures](/docs/signature-verification) for how to verify the asset signature
|
||||
- [from our download page](/download)
|
||||
- [by building from source](/docs/build) (either with `go` or `xcaddy`)
|
||||
2. [Install Caddy as a system service.](/docs/running#manual-installation) This is strongly recommended, especially for production servers.
|
||||
|
||||
Place the binary in one of your `$PATH` (or `%PATH%` on Windows) directories so you can run `caddy` without typing the full path of the executable file. (Run `echo $PATH` to see the list of directories that qualify.)
|
||||
|
||||
You can upgrade static binaries by replacing them with newer versions and restarting Caddy. The [`caddy upgrade` command](/docs/command-line#caddy-upgrade) can make this easy.
|
||||
|
||||
</div>
|
||||
<div id="qa-content-cfg_ondemand_smallscale">
|
||||
|
||||
On-demand TLS is designed for situations when you either don't control the domain names, or you have too many certificates to load all at once when the server starts. For every other use case, standard TLS automation is likely better suited.
|
||||
|
||||
</div>
|
||||
<div id="qa-content-cfg_ondemand_caddyfile">
|
||||
|
||||
|
||||
In order to prevent abuse, you must first configure an `ask` endpoint so Caddy can check whether it should get a certificate. Add this to your global options at the top:
|
||||
|
||||
```caddy
|
||||
{
|
||||
on_demand_tls {
|
||||
ask http://localhost:5555/check
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Change that endpoint to be something you've set up that will respond with HTTP 200 if the domain given in the `domain=` query parameter is allowed to have a certificate.
|
||||
|
||||
Then create a site block that serves all sites/hosts on the TLS port:
|
||||
|
||||
```caddy
|
||||
https:// {
|
||||
tls {
|
||||
on_demand
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This is the minimum config to enable Caddy to accept and service TLS connections for arbitrary hosts. This config doesn't invoke any handlers. Usually you'll also [`reverse_proxy`](/docs/caddyfile/directives/reverse_proxy) to your backend application.
|
||||
|
||||
</div>
|
103
src/includes/quick-assist/core.html
Normal file
103
src/includes/quick-assist/core.html
Normal file
|
@ -0,0 +1,103 @@
|
|||
{{ include "/includes/quick-assist/structure.html" }}
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('quick_assist', () => ({
|
||||
current: 'start',
|
||||
crumbs: [],
|
||||
structure: quickAssistStructure,
|
||||
|
||||
getQuestion() {
|
||||
const data = this.structure[this.current];
|
||||
return data ? (data.title ?? data.prompt) : "";
|
||||
},
|
||||
getContent() {
|
||||
const content = document.getElementById(`qa-content-${this.current}`);
|
||||
return content ? content.innerHTML : "";
|
||||
},
|
||||
getOptions() {
|
||||
const data = this.structure[this.current];
|
||||
return data ? (data.options ?? []) : [];
|
||||
},
|
||||
hasNext() {
|
||||
return this.getOptions().some(opt => opt.next);
|
||||
},
|
||||
crumbTitle(crumb) {
|
||||
if (crumb.title) {
|
||||
return crumb.title;
|
||||
}
|
||||
const data = this.structure[crumb.id];
|
||||
return data ? (data.title ?? data.prompt) : "";
|
||||
},
|
||||
goto(next, title = null) {
|
||||
if (!next) return true;
|
||||
|
||||
// Do nothing if last crumb is the same as the next state
|
||||
const count = this.crumbs.length;
|
||||
if (count && this.crumbs[count - 1].id === next) return true;
|
||||
|
||||
// Change the page
|
||||
this.current = next;
|
||||
|
||||
// Read backwards through the crumbs and if we find it pop everything after it
|
||||
for (let i = count - 1; i >= 0; i--) {
|
||||
if (this.crumbs[i].id === next) {
|
||||
this.crumbs.splice(i + 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Insert the crumb
|
||||
this.crumbs.push({ id: next, title: title });
|
||||
return false;
|
||||
},
|
||||
reset() {
|
||||
this.current = 'start';
|
||||
this.crumbs = [];
|
||||
}
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
<div x-data="quick_assist" class="box box-filled box-capped quick-assist">
|
||||
<div class="box-cap quick-assist-history">
|
||||
<a title="Click quick for slick trick (not AI)" @click="reset()">Quick Assist</a>
|
||||
<template x-for="crumb in crumbs">
|
||||
<a x-text="crumbTitle(crumb)" @click="goto(crumb.id)" />
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="quick-assist-question" x-text="getQuestion()"></h3>
|
||||
<div class="quick-assist-content" x-html="getContent()"></div>
|
||||
<div class="quick-assist-options">
|
||||
<template x-for="opt in getOptions()">
|
||||
<div>
|
||||
<a
|
||||
x-show="opt.href ?? false"
|
||||
:href="opt.href"
|
||||
x-text="opt.text ?? ''"
|
||||
class="button reset"
|
||||
/>
|
||||
<a
|
||||
x-show="!opt.href"
|
||||
@click.prevent="goto(opt.next, opt.crumb ?? opt.text)"
|
||||
x-text="opt.text ?? ''"
|
||||
class="button reset"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<a
|
||||
x-show="!hasNext()"
|
||||
@click="reset()"
|
||||
class="button reset"
|
||||
>
|
||||
Reset
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- All the markdown content is hidden by default and loaded by ID -->
|
||||
<div style="display: none;">
|
||||
{{ markdown (include "/includes/quick-assist/content.md") }}
|
||||
</div>
|
275
src/includes/quick-assist/structure.html
Normal file
275
src/includes/quick-assist/structure.html
Normal file
|
@ -0,0 +1,275 @@
|
|||
<script>
|
||||
const quickAssistStructure = {
|
||||
start: {
|
||||
prompt: "What are you looking for?",
|
||||
options: [
|
||||
{
|
||||
text: "How to install Caddy",
|
||||
next: "install"
|
||||
},
|
||||
{
|
||||
text: "Help configuring Caddy",
|
||||
next: "configure"
|
||||
},
|
||||
{
|
||||
text: "A solution to a problem",
|
||||
next: "solution"
|
||||
},
|
||||
{
|
||||
text: "An example for my use case",
|
||||
next: "example"
|
||||
}
|
||||
]
|
||||
},
|
||||
install: {
|
||||
prompt: "How do you want to install Caddy?",
|
||||
options: [
|
||||
{
|
||||
text: "OS package manager",
|
||||
next: "install_pkgmgr"
|
||||
},
|
||||
{
|
||||
text: "Docker",
|
||||
next: "install_docker"
|
||||
},
|
||||
{
|
||||
text: "Build from source",
|
||||
next: "install_build"
|
||||
},
|
||||
{
|
||||
text: "Build with plugins",
|
||||
next: "install_with_plugins"
|
||||
},
|
||||
{
|
||||
text: "Pre-built binary",
|
||||
next: "install_binary"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_pkgmgr: {
|
||||
prompt: "Which OS are you using?",
|
||||
options: [
|
||||
{
|
||||
text: "Linux (Debian, Ubuntu, Raspbian)",
|
||||
next: "install_dpkg"
|
||||
},
|
||||
{
|
||||
text: "Linux (Fedora, RedHat, CentOS)",
|
||||
next: "install_rpm"
|
||||
},
|
||||
{
|
||||
text: "Linux (Arch, Manjaro, Parabola)",
|
||||
next: "install_arch"
|
||||
},
|
||||
{
|
||||
text: "macOS",
|
||||
next: "install_mac"
|
||||
},
|
||||
{
|
||||
text: "Windows",
|
||||
next: "install_windows"
|
||||
},
|
||||
{
|
||||
text: "Nix/NixOS",
|
||||
next: "install_nix"
|
||||
},
|
||||
{
|
||||
text: "Android",
|
||||
next: "install_android"
|
||||
},
|
||||
{
|
||||
text: "Other",
|
||||
next: "install_other"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_dpkg: {
|
||||
title: "Install Caddy on Debian-based systems",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#debian-ubuntu-raspbian"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_rpm: {
|
||||
title: "Install Caddy via RPM",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#fedora-redhat-centos"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_arch: {
|
||||
title: "Install Caddy on Arch/Manjaro/Parabola Linux",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#arch-linux-manjaro-parabola"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_mac: {
|
||||
title: "Install Caddy on macOS",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#homebrew"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_windows: {
|
||||
title: "Install Caddy on Windows",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_nix: {
|
||||
title: "Install Caddy on Nix/Nixpkgs/NixOS",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#nixnixpkgsnixos"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_android: {
|
||||
title: "Install Caddy on Android",
|
||||
content: ``,
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#termux"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_other: {
|
||||
title: "Miscellaneous install methods",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#fedora-redhat-centos"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_docker: {
|
||||
title: "Official Docker image",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/install#docker"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_build: {
|
||||
title: "Build Caddy from source",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/build"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_with_plugins: {
|
||||
title: "Build Caddy with plugins",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/build#xcaddy"
|
||||
}
|
||||
]
|
||||
},
|
||||
install_binary: {
|
||||
title: "Install Caddy binary manually",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/build#xcaddy"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
configure: {
|
||||
prompt: "What are you trying to configure?",
|
||||
options: [
|
||||
{
|
||||
text: "On-demand TLS",
|
||||
next: "cfg_ondemand"
|
||||
},
|
||||
{
|
||||
text: "Authentication",
|
||||
next: "cfg_authentication"
|
||||
},
|
||||
{
|
||||
text: "Load balancing",
|
||||
next: "cfg_loadbalancing"
|
||||
}
|
||||
]
|
||||
},
|
||||
cfg_ondemand: {
|
||||
prompt: "Do you control the (DNS records of) the domain names you're serving?",
|
||||
options: [
|
||||
{
|
||||
text: "Yes",
|
||||
crumb: "I control the domains",
|
||||
next: "cfg_ondemand_havecontrol"
|
||||
},
|
||||
{
|
||||
text: "No",
|
||||
crumb: "DNS out of my control",
|
||||
next: "cfg_ondemand_ok"
|
||||
}
|
||||
]
|
||||
},
|
||||
cfg_ondemand_havecontrol: {
|
||||
prompt: "Do you have hundreds or thousands of your own domain names to serve?",
|
||||
options: [
|
||||
{
|
||||
text: "Yes",
|
||||
crumb: "Lots of domains",
|
||||
next: "cfg_ondemand_ok"
|
||||
},
|
||||
{
|
||||
text: "No",
|
||||
crumb: "Small scale",
|
||||
next: "cfg_ondemand_smallscale"
|
||||
}
|
||||
]
|
||||
},
|
||||
cfg_ondemand_smallscale: {
|
||||
title: "You likely don't need on-demand TLS.",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/automatic-https#on-demand-tls"
|
||||
}
|
||||
]
|
||||
},
|
||||
cfg_ondemand_ok: {
|
||||
prompt: "Are you using the Caddyfile or JSON to configure Caddy?",
|
||||
options: [
|
||||
{
|
||||
text: "Caddyfile",
|
||||
next: "cfg_ondemand_caddyfile"
|
||||
},
|
||||
{
|
||||
text: "JSON",
|
||||
next: "cfg_ondemand_json"
|
||||
}
|
||||
]
|
||||
},
|
||||
cfg_ondemand_caddyfile: {
|
||||
title: "Setting up On-Demand TLS",
|
||||
options: [
|
||||
{
|
||||
text: "Learn more",
|
||||
href: "/docs/automatic-https#on-demand-tls"
|
||||
}
|
||||
]
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue