fix(garage): Setup correctly the reverse proxy
This commit is contained in:
parent
a23ba62f27
commit
4b6e2fc3b1
1 changed files with 24 additions and 7 deletions
|
@ -17,13 +17,13 @@ in {
|
||||||
"a79e86c6fc0e0a02ff71fd3c6127887b6e029ea6e8ade6c3de1a0b7b09ad2873";
|
"a79e86c6fc0e0a02ff71fd3c6127887b6e029ea6e8ade6c3de1a0b7b09ad2873";
|
||||||
|
|
||||||
s3_api = {
|
s3_api = {
|
||||||
s3_region = "par01";
|
s3_region = "garage";
|
||||||
api_bind_addr = "[::]:3900";
|
api_bind_addr = "127.0.0.1:3900";
|
||||||
root_domain = ".${host}";
|
root_domain = ".${host}";
|
||||||
};
|
};
|
||||||
|
|
||||||
s3_web = {
|
s3_web = {
|
||||||
bind_addr = "[::]:3902";
|
bind_addr = "127.0.0.1:3902";
|
||||||
root_domain = ".${webHost}";
|
root_domain = ".${webHost}";
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
};
|
};
|
||||||
|
@ -37,9 +37,26 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts.${host} = {
|
services.nginx.virtualHosts = {
|
||||||
|
${host} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".proxyPass = "http://[::1]:3900";
|
locations."/".extraConfig = ''
|
||||||
|
proxy_pass http://127.0.0.1:3900;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
# Disable buffering to a temporary file.
|
||||||
|
proxy_max_temp_file_size 0;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
${webHost} = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
proxy_pass http://127.0.0.1:3902;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue