mirror of
https://github.com/caddyserver/website.git
synced 2025-05-07 12:17:15 -04:00
Apply suggestions from code review
Co-authored-by: Carl George <carl@george.computer>
This commit is contained in:
parent
e25b1ae179
commit
37d274d8a6
2 changed files with 7 additions and 7 deletions
|
@ -61,7 +61,7 @@ Testing releases (includes betas and release candidates):
|
||||||
|
|
||||||
[**View the Cloudsmith repos**](https://cloudsmith.io/~caddy/repos/)
|
[**View the Cloudsmith repos**](https://cloudsmith.io/~caddy/repos/)
|
||||||
|
|
||||||
If you wish to use the packaged support files (systemd services, bash completion and default configuration) with a custom Caddy build, instructions can be [found here](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debian-ubuntu-raspbian).
|
If you wish to use the packaged support files (systemd services, bash completion and default configuration) with a custom Caddy build, instructions can be [found here](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debianubunturaspbian).
|
||||||
|
|
||||||
|
|
||||||
## Fedora, RedHat, CentOS
|
## Fedora, RedHat, CentOS
|
||||||
|
|
|
@ -23,10 +23,9 @@ We provide two different systemd unit files that you can choose between, dependi
|
||||||
|
|
||||||
They are very similar, but differ in the `ExecStart` and `ExecReload` commands to accommodate the workflows.
|
They are very similar, but differ in the `ExecStart` and `ExecReload` commands to accommodate the workflows.
|
||||||
|
|
||||||
If you need to switch between the services, you should disable the previous one before enabling the other. For example, to switch from the `caddy` service to the `caddy-api` service:
|
If you need to switch between the services, you should disable and stop the previous one before enabling and starting the other. For example, to switch from the `caddy` service to the `caddy-api` service:
|
||||||
<pre><code class="cmd"><span class="bash">sudo systemctl disable caddy</span>
|
<pre><code class="cmd"><span class="bash">sudo systemctl disable --now caddy</span>
|
||||||
<span class="bash">sudo systemctl enable caddy-api</span>
|
<span class="bash">sudo systemctl enable --now caddy-api</span></code></pre>
|
||||||
<span class="bash">sudo systemctl start caddy-api</span></code></pre>
|
|
||||||
|
|
||||||
|
|
||||||
## Using the Service
|
## Using the Service
|
||||||
|
@ -88,8 +87,7 @@ The usual place to save the service file is: `/etc/systemd/system/caddy.service`
|
||||||
After saving your service file, you can start the service for the first time with the usual systemctl dance:
|
After saving your service file, you can start the service for the first time with the usual systemctl dance:
|
||||||
|
|
||||||
<pre><code class="cmd"><span class="bash">sudo systemctl daemon-reload</span>
|
<pre><code class="cmd"><span class="bash">sudo systemctl daemon-reload</span>
|
||||||
<span class="bash">sudo systemctl enable caddy</span>
|
<span class="bash">sudo systemctl enable --now caddy</span></code></pre>
|
||||||
<span class="bash">sudo systemctl start caddy</span></code></pre>
|
|
||||||
|
|
||||||
Verify that it is running:
|
Verify that it is running:
|
||||||
<pre><code class="cmd bash">systemctl status caddy</code></pre>
|
<pre><code class="cmd bash">systemctl status caddy</code></pre>
|
||||||
|
@ -113,7 +111,9 @@ Environment="CF_API_TOKEN=super-secret-cloudflare-tokenvalue"
|
||||||
Or, for example if you need to change the config file from the default of the Caddyfile, to instead using a JSON file:
|
Or, for example if you need to change the config file from the default of the Caddyfile, to instead using a JSON file:
|
||||||
```systemd
|
```systemd
|
||||||
[Service]
|
[Service]
|
||||||
|
ExecStart=
|
||||||
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/caddy.json
|
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/caddy.json
|
||||||
|
ExecReload=
|
||||||
ExecReload=/usr/bin/caddy reload --config /etc/caddy/caddy.json
|
ExecReload=/usr/bin/caddy reload --config /etc/caddy/caddy.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue