freshrss: try to fix virtualHost
This commit is contained in:
parent
68eb9746b2
commit
0f2d56e4af
1 changed files with 25 additions and 9 deletions
|
@ -1,4 +1,7 @@
|
|||
{ ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.freshrss;
|
||||
in
|
||||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /run/agenix/freshrss 0770 freshrss freshrss -"
|
||||
|
@ -11,11 +14,11 @@
|
|||
baseUrl = "https://rss.bhankas.org";
|
||||
defaultUser = "payas";
|
||||
passwordFile = "/run/agenix/freshrss";
|
||||
authType = "none";
|
||||
authType = "form";
|
||||
database = {
|
||||
type = "sqlite";
|
||||
};
|
||||
virtualHost = null; # set explicitly below
|
||||
virtualHost = "rss.bhankas.org";
|
||||
};
|
||||
|
||||
nginx = {
|
||||
|
@ -23,12 +26,25 @@
|
|||
"rss.bhankas.org" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:28981";
|
||||
proxyWebsockets = false;
|
||||
extraConfig =
|
||||
"proxy_set_header Host $host;"
|
||||
;
|
||||
locations = {
|
||||
"/".extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
|
||||
"~ ^.+?\.php(/.*)?$".extraConfig = ''
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.socket};
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
# By default, the variable PATH_INFO is not set under PHP-FPM
|
||||
# But FreshRSS API greader.php need it. If you have a “Bad Request” error, double check this var!
|
||||
# NOTE: the separate $path_info variable is required. For more details, see:
|
||||
# https://trac.nginx.org/nginx/ticket/321
|
||||
set $path_info $fastcgi_path_info;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||
include ${pkgs.nginx}/conf/fastcgi.conf;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Reference in a new issue