2016-04-24 14:45:15 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2019-08-25 16:04:33 +00:00
|
|
|
services.nginx = {
|
|
|
|
virtualHosts."gebner.org" = {
|
2020-10-30 17:45:44 +00:00
|
|
|
enableACME = true;
|
2019-08-25 16:04:33 +00:00
|
|
|
forceSSL = true;
|
|
|
|
root = "/srv/www.gebner.org";
|
|
|
|
extraConfig = ''
|
2020-10-30 18:06:17 +00:00
|
|
|
access_log /var/log/nginx/website_access.log;
|
2019-08-25 16:04:33 +00: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 16:02:42 +00:00
|
|
|
|
|
|
|
services.fcgiwrap = {
|
|
|
|
enable = true;
|
2018-03-16 16:38:48 +00:00
|
|
|
user = "nobody";
|
|
|
|
group = "nogroup";
|
2018-03-16 16:02:42 +00:00
|
|
|
};
|
2016-04-24 14:45:15 +00:00
|
|
|
}
|