Tt-rss: Difference between revisions
imported from old wiki |
Added Caddy web server configuration (hopefully I’ll be able to upstream this at some point) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
[https://tt-rss.org/ Tiny Tiny RSS] is a free and open source web-based news feed (RSS/Atom) reader and aggregator. | |||
__TOC__ | __TOC__ | ||
Line 12: | Line 14: | ||
selfUrlPath = "https://example.com/tt-rss"; | selfUrlPath = "https://example.com/tt-rss"; | ||
}; | }; | ||
</syntaxhighlight> | |||
=== Using Caddy as web server instead of nginx === | |||
As of NixOS 24.11 the following configuration works, future versions of NixOS may expose this as native Caddy support for Tiny Tiny RSS instead:<syntaxhighlight lang="nix"> | |||
{ config, pkgs, lib, ... }: | |||
let | |||
hostNames = [ | |||
"tt-rss.example.com" | |||
]; | |||
in { | |||
services.tt-rss = { | |||
enable = true; | |||
# Address at which Tiny Tiny RSS is publically exposed | |||
selfUrlPath = "https://${lib.lists.head hostNames}/"; | |||
# Disable nginx integration as it will conflict with Caddy | |||
virtualHost = null; | |||
}; | |||
# Caddy reverse proxy configuration | |||
services.caddy.virtualHosts.tt-rss = { | |||
hostName = lib.lists.head hostNames; | |||
serverAliases = lib.lists.tail hostNames; | |||
extraConfig = '' | |||
root * ${config.services.tt-rss.root}/www | |||
php_fastcgi * unix/${config.services.phpfpm.pools.${config.services.tt-rss.pool}.socket} { | |||
capture_stderr | |||
} | |||
file_server { | |||
browse | |||
} | |||
''; | |||
}; | |||
# Workaround: Create PHP-FPM socket with Caddy user instead of non-existing nginx | |||
services.phpfpm.pools."${config.services.tt-rss.pool}".settings = { | |||
"listen.owner" = config.services.caddy.user; | |||
"listen.group" = config.services.caddy.group; | |||
}; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||