From 4f58b29d5d000bcb336cd27072468363b120118b Mon Sep 17 00:00:00 2001 From: Scott Breakall Date: Wed, 13 Mar 2019 19:29:12 -0400 Subject: [PATCH 1/4] Create mytinytodo.subfolder.conf.example --- mytinytodo.subfolder.conf.example | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 mytinytodo.subfolder.conf.example diff --git a/mytinytodo.subfolder.conf.example b/mytinytodo.subfolder.conf.example new file mode 100644 index 0000000..b302270 --- /dev/null +++ b/mytinytodo.subfolder.conf.example @@ -0,0 +1,11 @@ +# set the mtt_url config in db/config.php + +location ^~ /todo { + return 301 $scheme://$host/todo/; +} + +location ^~ /todo/ { + include /config/nginx/proxy.conf; + set $upstream_mytinytodo mytinytodo; + proxy_pass http://$upstream_mytinytodo:80/; +} From 9bc2c15e324a6b07a88ec50ef50dfe8bb0d835ba Mon Sep 17 00:00:00 2001 From: Scott Breakall Date: Wed, 13 Mar 2019 19:30:44 -0400 Subject: [PATCH 2/4] Add note about mytinytodo docker build --- mytinytodo.subfolder.conf.example | 1 + 1 file changed, 1 insertion(+) diff --git a/mytinytodo.subfolder.conf.example b/mytinytodo.subfolder.conf.example index b302270..c03d7a6 100644 --- a/mytinytodo.subfolder.conf.example +++ b/mytinytodo.subfolder.conf.example @@ -1,3 +1,4 @@ +# works with https://github.com/breakall/mytinytodo-docker # set the mtt_url config in db/config.php location ^~ /todo { From e3e97a5031e28515efaec54d88131bb68798f081 Mon Sep 17 00:00:00 2001 From: Scott Breakall Date: Wed, 13 Mar 2019 20:40:19 -0400 Subject: [PATCH 3/4] Add auth sections and resolver line --- mytinytodo.subfolder.conf.example | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mytinytodo.subfolder.conf.example b/mytinytodo.subfolder.conf.example index c03d7a6..426519d 100644 --- a/mytinytodo.subfolder.conf.example +++ b/mytinytodo.subfolder.conf.example @@ -1,5 +1,13 @@ # works with https://github.com/breakall/mytinytodo-docker -# set the mtt_url config in db/config.php +# set the mtt_url config in db/config.php according to the instructions + +# enable the next two lines for http auth +#auth_basic "Restricted"; +#auth_basic_user_file /config/nginx/.htpasswd; + +# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf +#auth_request /auth; +#error_page 401 =200 /login; location ^~ /todo { return 301 $scheme://$host/todo/; @@ -7,6 +15,7 @@ location ^~ /todo { location ^~ /todo/ { include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; set $upstream_mytinytodo mytinytodo; proxy_pass http://$upstream_mytinytodo:80/; } From 80accc62e66ae9467d573d8c547e4ad4ff5ecfc8 Mon Sep 17 00:00:00 2001 From: Scott Breakall Date: Thu, 14 Mar 2019 22:42:31 -0400 Subject: [PATCH 4/4] Update mytinytodo.subfolder.conf.example --- mytinytodo.subfolder.conf.example | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mytinytodo.subfolder.conf.example b/mytinytodo.subfolder.conf.example index 426519d..97730a8 100644 --- a/mytinytodo.subfolder.conf.example +++ b/mytinytodo.subfolder.conf.example @@ -1,19 +1,20 @@ # works with https://github.com/breakall/mytinytodo-docker -# set the mtt_url config in db/config.php according to the instructions - -# enable the next two lines for http auth -#auth_basic "Restricted"; -#auth_basic_user_file /config/nginx/.htpasswd; - -# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf -#auth_request /auth; -#error_page 401 =200 /login; +# set the mtt_url to 'https://your.domain.com/todo/' in db/config.php location ^~ /todo { return 301 $scheme://$host/todo/; } location ^~ /todo/ { + + # enable the next two lines for http auth + # auth_basic "Restricted"; + # auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf + # auth_request /auth; + # error_page 401 =200 /login; + include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_mytinytodo mytinytodo;