Migrate website from httpd to lighttpd

This commit is contained in:
♥ Minnie ♥ 2024-06-06 20:34:56 +08:00
parent f183eee3ac
commit 5e3f774b80
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
3 changed files with 34 additions and 36 deletions

View file

@ -6,8 +6,12 @@
./minecraft
./borgbackup.nix
./forgejo.nix
./httpd.nix
./lighttpd.nix
./mpd.nix
./samba.nix
./grafana.nix
./mysql.nix
./prometheus.nix
./endlessh-go.nix
];
}

View file

@ -1,35 +0,0 @@
{ ... }:
{
services.httpd = {
enable = true;
virtualHosts."sajenim.dev" = {
documentRoot = "/srv/services/httpd/sajenim.dev";
listen = [{
ip = "192.168.1.102";
port = 5624;
}];
adminAddr = "its.jassy@pm.me";
};
};
services.traefik.dynamicConfigOptions.http.routers = {
httpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "httpd";
};
};
services.traefik.dynamicConfigOptions.http.services = {
httpd.loadBalancer.servers = [
{ url = "http://127.0.0.1:5624"; }
];
};
}

View file

@ -0,0 +1,29 @@
{ config, ... }:
{
services.lighttpd = {
enable = true;
port = 5624;
document-root = "/srv/services/websites/sajenim.dev";
};
services.traefik.dynamicConfigOptions.http.routers = {
lighttpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "lighttpd";
};
};
services.traefik.dynamicConfigOptions.http.services = {
lighttpd.loadBalancer.servers = [
{ url = "http://127.0.0.1:${toString config.services.lighttpd.port}"; }
];
};
}