splitted nginx logs
This commit is contained in:
parent
9e9d1c0326
commit
cd84c425d6
4 changed files with 18 additions and 5 deletions
|
|
@ -2,15 +2,20 @@
|
||||||
let
|
let
|
||||||
port = "8000";
|
port = "8000";
|
||||||
db = "ihatemoney";
|
db = "ihatemoney";
|
||||||
|
domain = "geld.mc-fucker.cool";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
services.nginx.virtualHosts."geld.mc-fucker.cool" = {
|
services.nginx.virtualHosts."${domain}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${port}";
|
proxyPass = "http://localhost:${port}";
|
||||||
};
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
access_log /var/log/nginx/${domain}_access.log;
|
||||||
|
error_log /var/log/nginx/${domain}_error.log;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
|
|
@ -19,7 +24,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.ihatemoney = {
|
virtualisation.oci-containers.containers.ihatemoney = {
|
||||||
image = "e0f5c301fa0c";
|
image = "e867068a7f61";
|
||||||
environment = {
|
environment = {
|
||||||
ACTIVATE_ADMIN_DASHBOARD = "True";
|
ACTIVATE_ADMIN_DASHBOARD = "True";
|
||||||
ACTIVATE_DEMO_PROJECT = "False";
|
ACTIVATE_DEMO_PROJECT = "False";
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ in
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_headers_hash_bucket_size 64;
|
proxy_headers_hash_bucket_size 64;
|
||||||
|
access_log /var/log/nginx/${domain}_access.log;
|
||||||
|
error_log /var/log/nginx/${domain}_error.log;
|
||||||
'';
|
'';
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/" = {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ in
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_redirect http://127.0.0.1:${tandoor_port} https://${domain};
|
proxy_redirect http://127.0.0.1:${tandoor_port} https://${domain};
|
||||||
|
access_log /var/log/nginx/${domain}_access.log;
|
||||||
|
error_log /var/log/nginx/${domain}_error.log;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,10 @@ in
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${port}";
|
proxyPass = "http://localhost:${port}";
|
||||||
};
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
access_log /var/log/nginx/${domain}_access.log;
|
||||||
|
error_log /var/log/nginx/${domain}_error.log;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue