mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 14:06:17 -04:00
docs: New logging & arch articles; various minor improvements
This commit is contained in:
parent
e918275b63
commit
fe58da0269
9 changed files with 365 additions and 19 deletions
|
@ -2,7 +2,7 @@
|
|||
title: Caddyfile Quick-start
|
||||
---
|
||||
|
||||
# Caddyfile quick-start
|
||||
# Caddyfile Quick-start
|
||||
|
||||
Create a new text file named `Caddyfile` (no extension).
|
||||
|
||||
|
@ -24,11 +24,12 @@ Save this and run Caddy from the same folder that contains your Caddyfile:
|
|||
|
||||
<pre><code class="cmd bash">caddy start</code></pre>
|
||||
|
||||
You will probably be asked for your password, because Caddy serves all sites -- even local ones -- over HTTPS by default. (The password prompt should only happen the first time!)
|
||||
|
||||
<aside class="tip">
|
||||
For local HTTPS, Caddy automatically generates certificates and unique private keys for you. The root certificate is added to your system's trust store, which is why the password prompt is necessary. It allows you to develop locally over HTTPS without certificate errors. Just don't share your root key!
|
||||
For local HTTPS, Caddy automatically generates certificates and unique private keys for you. The root certificate is added to your system's trust store, which is why the password prompt is necessary. It allows you to develop locally over HTTPS without certificate errors.
|
||||
</aside>
|
||||
|
||||
You will probably be asked for your password, because Caddy will serve all sites -- even local ones -- over HTTPS. (The password prompt should only happen the first time!)
|
||||
|
||||
Either open your browser to [localhost](http://localhost) or `curl` it:
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: File server quick-start
|
||||
title: Static files quick-start
|
||||
---
|
||||
|
||||
# File server quick-start
|
||||
# Static files quick-start
|
||||
|
||||
This guide will show you how to get a production-ready static file server up and running quickly.
|
||||
|
||||
|
@ -21,7 +21,7 @@ In your terminal, change to the root directory of your site and run:
|
|||
|
||||
<pre><code class="cmd bash">caddy file-server</code></pre>
|
||||
|
||||
If you get a permission error, it probably means your OS does not allow you to bind to low ports -- so use a high port instead:
|
||||
If you get a permissions error, it probably means your OS does not allow you to bind to low ports -- so use a high port instead:
|
||||
|
||||
<pre><code class="cmd bash">caddy file-server --listen :2015</code></pre>
|
||||
|
||||
|
@ -53,7 +53,7 @@ Then, from the same directory, run:
|
|||
|
||||
<pre><code class="cmd bash">caddy run</code></pre>
|
||||
|
||||
You can then load [localhost](https://localhost) (or whatever the address in your config is) to see your site!
|
||||
You can then load [localhost](https://localhost) (or whatever the address is in your config) to see your site!
|
||||
|
||||
The [`file_server` directive](/docs/caddyfile/directives/file_server) has more options for you to customize your site. Make sure to [reload](/docs/command-line#caddy-reload) Caddy (or stop and start it again) when you change the Caddyfile!
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue