mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: testing switching to nginx
This commit is contained in:
parent
c19ea940bd
commit
93bad94e23
1 changed files with 31 additions and 6 deletions
|
@ -30,13 +30,38 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
caddy = {
|
# caddy = {
|
||||||
virtualHosts = {
|
# virtualHosts = {
|
||||||
${host} = {
|
# ${host} = {
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
reverse_proxy ${localhost}:${toString ports.port0}
|
# reverse_proxy ${localhost}:${toString ports.port0}
|
||||||
|
|
||||||
tls ${ssl.cert} ${ssl.key}
|
# tls ${ssl.cert} ${ssl.key}
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts.${host} = {
|
||||||
|
enableSSL = true;
|
||||||
|
sslCertificate = ssl.cert;
|
||||||
|
sslCertificateKey = ssl.key;
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "0.0.0.0";
|
||||||
|
port = 4443; # Use your desired port number
|
||||||
|
ssl = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${localhost}:${toString ports.port0}";
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue