summaryrefslogtreecommitdiffstats
path: root/roles/media/templates/nginx-include
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-10-10 10:21:30 -0400
committerSacha Chua <sacha@sachachua.com>2023-10-10 10:21:30 -0400
commit4ef6627aa71a2c94a2ae7615d5e93d6689ac8b5a (patch)
tree9dee331d9ba8328df4dc8c448c1e1554e82ec721 /roles/media/templates/nginx-include
parentf9b00ef5d578e331f0c8269e6138cdac45fc4e99 (diff)
downloademacsconf-ansible-4ef6627aa71a2c94a2ae7615d5e93d6689ac8b5a.tar.xz
emacsconf-ansible-4ef6627aa71a2c94a2ae7615d5e93d6689ac8b5a.zip
copy scripts
Diffstat (limited to 'roles/media/templates/nginx-include')
-rw-r--r--roles/media/templates/nginx-include44
1 files changed, 22 insertions, 22 deletions
diff --git a/roles/media/templates/nginx-include b/roles/media/templates/nginx-include
index 03a7bfa..0f74c60 100644
--- a/roles/media/templates/nginx-include
+++ b/roles/media/templates/nginx-include
@@ -1,26 +1,14 @@
rewrite ^/current/bbb-open.html$ {{ bbb_open_url }} redirect;
location /{{ emacsconf_year }}/backstage {
-auth_basic "Restricted";
-auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd;
-autoindex on;
-rewrite ^/{{ emacsconf_year }}/backstage/current/pad/([^/]*)$ https://{{ etherpad_server_name }}/{{ emacsconf_year }}-$1 redirect;
-rewrite ^/{{ emacsconf_year }}/backstage/current/room/([^/]*)$ https://{{ media_server_name }}/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$1.html redirect;
-rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/pad/?$ https://{{ etherpad_server_name }}/{{ emacsconf_year }}-$1 redirect;
-rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/room/?$ https://{{ media_server_name }}/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$1.html redirect;
-}
- {% if media_protect_root|bool %}
- location /{{ emacsconf_year }} {
- # TODO: Figure out how to make this properly controlled by the variable
- # auth_basic "Restricted";
- # auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd;
- autoindex on;
- }
- {% else %}
- location /{{ emacsconf_year }} {
- autoindex on;
- }
- {% endif %}
- location /{{ emacsconf_year }}/{{ emacsconf_id }}.ics {
+ auth_basic "Restricted";
+ auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd;
+ autoindex on;
+ rewrite ^/{{ emacsconf_year }}/backstage/current/pad/([^/]*)$ https://{{ etherpad_server_name }}/{{ emacsconf_year }}-$1 redirect;
+ rewrite ^/{{ emacsconf_year }}/backstage/current/room/([^/]*)$ https://{{ media_server_name }}/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$1.html redirect;
+ rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/pad/?$ https://{{ etherpad_server_name }}/{{ emacsconf_year }}-$1 redirect;
+ rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/room/?$ https://{{ media_server_name }}/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$1.html redirect;
+ }
+ location /{{ emacsconf_year }}/{{ emacsconf_id }}.ics {
auth_basic off;
}
location /{{ emacsconf_year }}/schedules/ {
@@ -30,4 +18,16 @@ rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/room/?$ https://{{ medi
location /{{ emacsconf_year }}/{{ emacsconf_id }}-{{ track.id }}.ics {
auth_basic off;
}
- {% endfor %} \ No newline at end of file
+ {% endfor %}
+{% if media_protect_root == 'true' %}
+ location /{{ emacsconf_year }} {
+ # TODO: Figure out how to make this properly controlled by the variable
+ auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd;
+ auth_basic "Restricted";
+ autoindex on;
+ }
+{% else %}
+ location /{{ emacsconf_year }} {
+ autoindex on;
+ }
+{% endif %}