Matrix, Caddy
* Nginx to caddy (#5) Convert all nginx instances to caddy instances, setup acme as well * matrix implemented
This commit is contained in:
parent
742be942bb
commit
e0590ff20b
25 changed files with 182 additions and 484 deletions
|
|
@ -33,33 +33,16 @@ in
|
|||
# Routing #
|
||||
###########
|
||||
|
||||
services.nginx = {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"bar.wanderingcrow.net" = {
|
||||
extraConfig = ''
|
||||
allow 192.168.0.0/16;
|
||||
allow 10.8.0.0/24;
|
||||
allow ${inputs.nix-secrets.network.primary.publicIP};
|
||||
deny all;
|
||||
'';
|
||||
forceSSL = true;
|
||||
useACMEHost = "bar.wanderingcrow.net";
|
||||
locations = {
|
||||
"/search/" = {
|
||||
proxyPass = "http://10.88.0.3:7700/";
|
||||
priority = 1;
|
||||
};
|
||||
"/api/" = {
|
||||
proxyPass = "http://10.88.0.4:8080/";
|
||||
priority = 1;
|
||||
};
|
||||
"/" = {
|
||||
proxyPass = "http://10.88.0.5:8080/";
|
||||
};
|
||||
};
|
||||
};
|
||||
"bar.wanderingcrow.net".extraConfig = ''
|
||||
@block not remote_ip ${inputs.nix-secrets.network.primary.publicIP} private_ranges
|
||||
abort @block
|
||||
reverse_proxy /search/ http://10.88.0.3:7700
|
||||
reverse_proxy /api/ http://10.88.0.4:8080
|
||||
reverse_proxy http://10.88.0.5:8080
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue