Skip to content
Snippets Groups Projects
Commit dafa3685 authored by ynerant's avatar ynerant Committed by ynerant
Browse files

[nginx] Copy 401 error page if we use credentials


Signed-off-by: ynerant's avatarYohann D'ANELLO <ynerant@crans.org>
parent 0eaee6c7
No related branches found
No related tags found
1 merge request!165Nginx
......@@ -17,7 +17,7 @@ loc_nginx:
- filter: "/error/"
params:
- "internal"
- "alias /var/www"
- "alias /var/www/html"
- filter: "/create"
params:
- "default_type text/html"
......@@ -34,7 +34,7 @@ loc_nginx:
- "deny all"
- "auth_basic \"On n'aime pas les spambots, donc on a mis un mot de passe. Le login est Stop et le mot de passe est Spam.\""
- "auth_basic_user_file /etc/nginx/passwd"
- "error_page 401 /error/custom_401.html"
- "error_page 401 /error/401.html"
- filter: "~ ^/admin"
params:
- "satisfy any"
......@@ -44,7 +44,7 @@ loc_nginx:
- "deny all"
- "auth_basic \"On n'aime pas les spambots, donc on a mis un mot de passe. Le login est Stop et le mot de passe est Spam.\""
- "auth_basic_user_file /etc/nginx/passwd"
- "error_page 401 /error/custom_401.html"
- "error_page 401 /error/401.html"
- filter: "/images/mailman"
params:
- "alias /usr/share/images/mailman"
......
......@@ -78,7 +78,14 @@
mode: 0755
- name: Install passwords
when: nginx.auth_passwd|length > 0
template:
src: nginx/passwd.j2
dest: /etc/nginx/passwd
mode: 0644
- name: Copy 401 error page
when: nginx.auth_passwd|length > 0
template:
src: www/html/401.html.j2
dest: /var/www/html/401.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment