mirror of
https://github.com/LemmyNet/lemmy-docs.git
synced 2024-11-22 04:11:09 +00:00
adding caddy configuration example (#154)
This commit is contained in:
parent
ce0640e073
commit
27a1109bed
3 changed files with 56 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
- [Getting started with Federation](administration/federation_getting_started.md)
|
- [Getting started with Federation](administration/federation_getting_started.md)
|
||||||
- [Troubleshooting](administration/troubleshooting.md)
|
- [Troubleshooting](administration/troubleshooting.md)
|
||||||
- [Backup and Restore](administration/backup_and_restore.md)
|
- [Backup and Restore](administration/backup_and_restore.md)
|
||||||
|
- [Using Caddy as a reverse proxy](administration/caddy.md)
|
||||||
- [Moderation](moderation/moderation.md)
|
- [Moderation](moderation/moderation.md)
|
||||||
- [Federation](federation/federation.md)
|
- [Federation](federation/federation.md)
|
||||||
- [Federation Overview](federation/overview.md)
|
- [Federation Overview](federation/overview.md)
|
||||||
|
|
|
@ -20,3 +20,7 @@ In some cases, it might be necessary to use different installation methods. But
|
||||||
- [From Scratch](from_scratch.md)
|
- [From Scratch](from_scratch.md)
|
||||||
- [Yunohost](https://install-app.yunohost.org/?app=lemmy) ([source code](https://github.com/YunoHost-Apps/lemmy_ynh))
|
- [Yunohost](https://install-app.yunohost.org/?app=lemmy) ([source code](https://github.com/YunoHost-Apps/lemmy_ynh))
|
||||||
- [On Amazon Web Services (AWS)](on_aws.md)
|
- [On Amazon Web Services (AWS)](on_aws.md)
|
||||||
|
|
||||||
|
### You could use any other reverse proxy
|
||||||
|
|
||||||
|
An Example [Caddy configuration](caddy.md).
|
||||||
|
|
51
src/en/administration/caddy.md
Normal file
51
src/en/administration/caddy.md
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# Using Caddy as reverse proxy example
|
||||||
|
|
||||||
|
If you prefer to use Caddy instead of Nginx - you could use this template to fit into your needs:
|
||||||
|
|
||||||
|
```
|
||||||
|
(caddy-common) {
|
||||||
|
encode gzip
|
||||||
|
header {
|
||||||
|
-Server
|
||||||
|
Strict-Transport-Security "max-age=31536000; include-subdomains;"
|
||||||
|
X-XSS-Protection "1; mode=block"
|
||||||
|
X-Frame-Options "DENY"
|
||||||
|
X-Content-Type-Options nosniff
|
||||||
|
Referrer-Policy no-referrer-when-downgrade
|
||||||
|
X-Robots-Tag "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lemmy-site.com {
|
||||||
|
import caddy-common
|
||||||
|
reverse_proxy http://lemmy_lemmy-ui_1:1234
|
||||||
|
}
|
||||||
|
|
||||||
|
@lemmy {
|
||||||
|
path /api/*
|
||||||
|
path /pictrs/*
|
||||||
|
path /feeds/*
|
||||||
|
path /nodeinfo/*
|
||||||
|
path /.well-known/*
|
||||||
|
}
|
||||||
|
|
||||||
|
@lemmy-hdr {
|
||||||
|
header Accept application/*
|
||||||
|
}
|
||||||
|
|
||||||
|
handle @lemmy {
|
||||||
|
reverse_proxy http://lemmy_lemmy_1:8536
|
||||||
|
}
|
||||||
|
|
||||||
|
handle @lemmy-hdr {
|
||||||
|
reverse_proxy http://lemmy_lemmy_1:8536
|
||||||
|
}
|
||||||
|
|
||||||
|
@lemmy-post {
|
||||||
|
method POST
|
||||||
|
}
|
||||||
|
|
||||||
|
handle @lemmy-post {
|
||||||
|
reverse_proxy http://lemmy_lemmy_1:8536
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in a new issue