nixos-config/mastus/website.nix

34 lines
660 B
Nix
Raw Permalink Normal View History

2016-04-24 16:45:15 +02:00
{ config, pkgs, ... }:
{
2019-08-25 18:04:33 +02:00
services.nginx = {
virtualHosts."gebner.org" = {
2020-10-30 18:45:44 +01:00
enableACME = true;
2019-08-25 18:04:33 +02:00
forceSSL = true;
root = "/srv/www.gebner.org";
extraConfig = ''
2020-10-30 19:06:17 +01:00
access_log /var/log/nginx/website_access.log;
2019-08-25 18:04:33 +02:00
error_page 404 403 /404.html;
location / {
try_files $uri $uri/ @not_found;
}
location @not_found {
try_files /404.cgi =404;
fastcgi_intercept_errors on;
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
}
'';
};
};
2018-03-16 17:02:42 +01:00
services.fcgiwrap = {
enable = true;
user = "nobody";
group = "nogroup";
2018-03-16 17:02:42 +01:00
};
2016-04-24 16:45:15 +02:00
}