Migrate website from httpd to lighttpd
This commit is contained in:
		
							parent
							
								
									f183eee3ac
								
							
						
					
					
						commit
						5e3f774b80
					
				
					 3 changed files with 34 additions and 36 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"; }
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										29
									
								
								nixos/viridian/services/lighttpd.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								nixos/viridian/services/lighttpd.nix
									
										
									
									
									
										Normal 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}"; }
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue