Create VPN subdomains

This commit is contained in:
Julien Malka 2022-02-26 18:55:41 +01:00
parent 56133bec60
commit c864b96f07
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F
9 changed files with 65 additions and 23 deletions

View file

@ -35,10 +35,44 @@ in
user = cfg.user;
group = cfg.group;
};
# services.nginx.appendHttpConfig = ''
# server {
# server_name tv.julienmalka.me;
# listen 80;
# return 301 https://$server_name$request_uri;
# }
# server {
# server_name tv.julienmalka.me;
# listen 443 ssl http2;
# include ${../authelia/authelia.conf}; # Authelia auth endpoint
# location / {
# proxy_pass http://127.0.0.1:8096;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# include ${../authelia/secure.conf}; # Protect this endpoint
# }
# }
# '';
}
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port) )]);
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port))
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]);