mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: Minor improvements
This commit is contained in:
parent
dd191b380f
commit
8f6cf99986
3 changed files with 5 additions and 5 deletions
|
@ -14,7 +14,7 @@ localhost
|
|||
|
||||
<aside class="tip">
|
||||
|
||||
If the HTTP and HTTPS ports (80 and 443, respectively) are privileged ports on your OS, you will either need to run with elevated privileges or use a higher port. To use a higher port, just change the address to something like `localhost:2015` and change the HTTP port using the [`http_port`](/docs/caddyfile/options) Caddyfile option.
|
||||
If the HTTP and HTTPS ports (80 and 443, respectively) are privileged ports on your OS, you will either need to run with elevated privileges or use higher ports. To gain permission, run as root with `sudo -E` or use `sudo setcap cap_net_bind_service=+ep $(which caddy)`. Alternatively, to use higher ports, just change the address to something like `localhost:2080` and change the HTTP port using the [`http_port`](/docs/caddyfile/options) Caddyfile option.
|
||||
|
||||
</aside>
|
||||
|
||||
|
@ -37,7 +37,7 @@ You will probably be asked for your password, because Caddy serves all sites --
|
|||
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>
|
||||
|
||||
If you get permission errors, you may need to run with elevated privileges.
|
||||
(If you get permission errors, you may need to run with elevated privileges or choose a port higher than 1024.)
|
||||
|
||||
Either open your browser to [localhost](http://localhost) or `curl` it:
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ This requires that the backend's certificate is trusted by the system Caddy is r
|
|||
|
||||
Of course, you can do HTTPS on both ends too:
|
||||
|
||||
<pre><code class="cmd bash">caddy reverse-proxy --from example.com --to https://localhost:9000</code></pre>
|
||||
<pre><code class="cmd bash">caddy reverse-proxy --from example.com --to https://example.com:9000</code></pre>
|
||||
|
||||
This serves HTTPS from client to proxy, and from proxy to backend.
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ file_server /subfolder/* browse
|
|||
Custom error pages can be accomplished with [`handle_errors`](/docs/caddyfile/directives/handle_errors).
|
||||
|
||||
|
||||
- **v1:**:
|
||||
- **v1:**
|
||||
|
||||
```
|
||||
errors {
|
||||
|
@ -164,7 +164,7 @@ errors {
|
|||
}
|
||||
```
|
||||
|
||||
- **v2:**:
|
||||
- **v2:**
|
||||
|
||||
```
|
||||
handle_errors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue