From 91a14cc63cc8e3514b194075ce915d860c91aa8b Mon Sep 17 00:00:00 2001 From: Jakub W Date: Sun, 10 Dec 2023 20:30:32 +0100 Subject: [PATCH 1/4] Added wikijs.subdomain.conf.sample nginx subdomain reverse proxy for wikijs docker container --- wikijs.subdomain.conf.sample | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 wikijs.subdomain.conf.sample diff --git a/wikijs.subdomain.conf.sample b/wikijs.subdomain.conf.sample new file mode 100644 index 0000000..42b9f4d --- /dev/null +++ b/wikijs.subdomain.conf.sample @@ -0,0 +1,54 @@ +## Version 2023/05/31 +# make sure that your wikijs container is named wikijs +# make sure that your dns has a cname set for wikijs + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + server_name wikijs.*; + + 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; + + # 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"; + #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; + + # 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 wikijs; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } + + location ~ (/wikijs)?/graphql { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app wikijs; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } +} From c53bb112f612caf8e9f8a5d90c1e5cd75921728a Mon Sep 17 00:00:00 2001 From: Jakub W Date: Sun, 10 Dec 2023 20:37:05 +0100 Subject: [PATCH 2/4] Add trailing newlines --- wikijs.subdomain.conf.sample | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wikijs.subdomain.conf.sample b/wikijs.subdomain.conf.sample index 42b9f4d..ab07313 100644 --- a/wikijs.subdomain.conf.sample +++ b/wikijs.subdomain.conf.sample @@ -41,6 +41,7 @@ server { set $upstream_port 3000; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/wikijs)?/graphql { @@ -50,5 +51,6 @@ server { set $upstream_port 3000; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } From 9098730e3025f0d3b4901b8185821d4a5951751e Mon Sep 17 00:00:00 2001 From: Jakub W Date: Thu, 21 Dec 2023 11:42:42 +0100 Subject: [PATCH 3/4] Add location block for API endpoint Add missing location block for influxdb API endpoint --- influxdb.subdomain.conf.sample | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/influxdb.subdomain.conf.sample b/influxdb.subdomain.conf.sample index e772beb..1c2f158 100644 --- a/influxdb.subdomain.conf.sample +++ b/influxdb.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/05/31 +## Version 2023/12/21 # make sure that your influxdb container is named influxdb # make sure that your dns has a cname set for influxdb @@ -41,6 +41,17 @@ server { set $upstream_port 8086; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + + location ~ (/influxdb)?/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app influxdb; + set $upstream_port 8086; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } From 55520164b48a85983b333c2f36b4f45da78cf669 Mon Sep 17 00:00:00 2001 From: Jakub W Date: Thu, 21 Dec 2023 11:52:24 +0100 Subject: [PATCH 4/4] Revert "Add location block for API endpoint" This reverts commit 9098730e3025f0d3b4901b8185821d4a5951751e. --- influxdb.subdomain.conf.sample | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/influxdb.subdomain.conf.sample b/influxdb.subdomain.conf.sample index 1c2f158..e772beb 100644 --- a/influxdb.subdomain.conf.sample +++ b/influxdb.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/12/21 +## Version 2023/05/31 # make sure that your influxdb container is named influxdb # make sure that your dns has a cname set for influxdb @@ -41,17 +41,6 @@ server { set $upstream_port 8086; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - - } - - location ~ (/influxdb)?/api { - include /config/nginx/proxy.conf; - include /config/nginx/resolver.conf; - set $upstream_app influxdb; - set $upstream_port 8086; - set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port; - } }