52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
#Only use this if you wanna run masto on a sub domain, but still keep @example.com as your federated domain
|
|
example.com {
|
|
redir 301 {
|
|
/.well-known/host-meta https://mastodon.example.com{uri}
|
|
}
|
|
}
|
|
|
|
mastodon.example.com {
|
|
root /home/user/mastodon/public
|
|
|
|
log /var/log/mastodon-access.log {
|
|
rotate_size 2
|
|
rotate_keep 30
|
|
}
|
|
errors /var/log/mastodon-error.log {
|
|
* 500.html
|
|
rotate_size 2
|
|
rotate_keep 30
|
|
}
|
|
|
|
header / {
|
|
Strict-Transport-Security "max-age=31536000;"
|
|
#-Content-Security-Policy
|
|
}
|
|
|
|
header /emoji Cache-Control "public, max-age=31536000, immutable"
|
|
header /packs Cache-Control "public, max-age=31536000, immutable"
|
|
header /system/accounts/avatars Cache-Control "public, max-age=31536000, immutable"
|
|
header /system/media_attachments/files Cache-Control "public, max-age=31536000, immutable"
|
|
|
|
rewrite {
|
|
if {path} is /
|
|
to /proxy{path}
|
|
}
|
|
|
|
rewrite {
|
|
if {path} not_has /api/v1/streaming
|
|
to {path} /proxy{path}
|
|
}
|
|
|
|
proxy /proxy localhost:3000 {
|
|
without /proxy
|
|
|
|
transparent
|
|
websocket
|
|
}
|
|
|
|
proxy /api/v1/streaming localhost:4000 {
|
|
transparent
|
|
websocket
|
|
}
|
|
} |