From 51732ccf1d80ada8363d5c532f7c383bbe8f5f59 Mon Sep 17 00:00:00 2001 From: roib20 <66280613+roib20@users.noreply.github.com> Date: Sun, 5 Feb 2023 21:24:59 +0200 Subject: [PATCH 1/3] Add Planka conf Signed-off-by: roib20 <66280613+roib20@users.noreply.github.com> --- planka.subdomain.conf.sample | 39 ++++++++++++++++++++++++++++++++++++ planka.subfolder.conf.sample | 26 ++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 planka.subdomain.conf.sample create mode 100644 planka.subfolder.conf.sample diff --git a/planka.subdomain.conf.sample b/planka.subdomain.conf.sample new file mode 100644 index 000000000..8bd670c09 --- /dev/null +++ b/planka.subdomain.conf.sample @@ -0,0 +1,39 @@ +## Version 2023/02/05 +# make sure that your dns has a cname set for planka +# make sure that the BASE_URL env variable in Planka container is set to: BASE_URL="https://planka.example.com" + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name planka.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth (requires ldap-location.conf in the location block) + #include /config/nginx/ldap-server.conf; + + # enable for Authelia (requires authelia-location.conf in the location block) + #include /config/nginx/authelia-server.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; + + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app planka; + set $upstream_port 1337; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } +} diff --git a/planka.subfolder.conf.sample b/planka.subfolder.conf.sample new file mode 100644 index 000000000..e65aaf23e --- /dev/null +++ b/planka.subfolder.conf.sample @@ -0,0 +1,26 @@ +## Version 2023/02/05 +# make sure that your dns has a cname set for planka +# make sure that the BASE_URL env variable in Planka container is set to: BASE_URL="https://example.com/planka/" + +location / { + return 301 $scheme://$host/planka/; +} + +location ^~ /planka/ { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; + + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app planka; + set $upstream_port 1337; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; +} From 5a0a372742d6a3786bdf907cdfd1c8f4b7ae85b6 Mon Sep 17 00:00:00 2001 From: roib20 <66280613+roib20@users.noreply.github.com> Date: Mon, 6 Feb 2023 00:29:17 +0200 Subject: [PATCH 2/3] Remove cname comment from planka.subfolder conf --- planka.subfolder.conf.sample | 1 - 1 file changed, 1 deletion(-) diff --git a/planka.subfolder.conf.sample b/planka.subfolder.conf.sample index e65aaf23e..b3ec6a843 100644 --- a/planka.subfolder.conf.sample +++ b/planka.subfolder.conf.sample @@ -1,5 +1,4 @@ ## Version 2023/02/05 -# make sure that your dns has a cname set for planka # make sure that the BASE_URL env variable in Planka container is set to: BASE_URL="https://example.com/planka/" location / { From 721e2297f98db45c16105a4a8105876ab7e1e0d7 Mon Sep 17 00:00:00 2001 From: roib20 <66280613+roib20@users.noreply.github.com> Date: Tue, 14 Feb 2023 00:52:11 +0200 Subject: [PATCH 3/3] Add authentik config lines and adjust comments --- planka.subdomain.conf.sample | 9 ++++++++- planka.subfolder.conf.sample | 9 +++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/planka.subdomain.conf.sample b/planka.subdomain.conf.sample index 8bd670c09..fd0c3c26b 100644 --- a/planka.subdomain.conf.sample +++ b/planka.subdomain.conf.sample @@ -1,6 +1,7 @@ ## Version 2023/02/05 +# make sure that your planka container is named planka # make sure that your dns has a cname set for planka -# make sure that the BASE_URL env variable in Planka container is set to: BASE_URL="https://planka.example.com" +# make sure that the BASE_URL env variable in planka container is set to: BASE_URL="https://planka.example.com" server { listen 443 ssl; @@ -18,6 +19,9 @@ server { # enable for Authelia (requires authelia-location.conf in the location block) #include /config/nginx/authelia-server.conf; + # enable for Authentik (requires authentik-location.conf in the location block) + #include /config/nginx/authentik-server.conf; + location / { # enable the next two lines for http auth #auth_basic "Restricted"; @@ -29,6 +33,9 @@ server { # enable for Authelia (requires authelia-server.conf in the server block) #include /config/nginx/authelia-location.conf; + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app planka; diff --git a/planka.subfolder.conf.sample b/planka.subfolder.conf.sample index b3ec6a843..b0d3d51fe 100644 --- a/planka.subfolder.conf.sample +++ b/planka.subfolder.conf.sample @@ -1,7 +1,9 @@ ## Version 2023/02/05 -# make sure that the BASE_URL env variable in Planka container is set to: BASE_URL="https://example.com/planka/" +# make sure that your planka container is named planka +# make sure that the BASE_URL env variable in planka container is set to: BASE_URL="https://example.com/planka/" -location / { + +location /planka { return 301 $scheme://$host/planka/; } @@ -16,6 +18,9 @@ location ^~ /planka/ { # enable for Authelia (requires authelia-server.conf in the server block) #include /config/nginx/authelia-location.conf; + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app planka;