Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ansible
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nounous
Ansible
Commits
dafa3685
Commit
dafa3685
authored
4 years ago
by
ynerant
Committed by
ynerant
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[nginx] Copy 401 error page if we use credentials
Signed-off-by:
Yohann D'ANELLO
<
ynerant@crans.org
>
parent
0eaee6c7
No related branches found
No related tags found
1 merge request
!165
Nginx
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
group_vars/mailman.yml
+3
-3
3 additions, 3 deletions
group_vars/mailman.yml
roles/nginx/tasks/main.yml
+7
-0
7 additions, 0 deletions
roles/nginx/tasks/main.yml
roles/nginx/templates/www/401.html.j2
+0
-0
0 additions, 0 deletions
roles/nginx/templates/www/401.html.j2
with
10 additions
and
3 deletions
group_vars/mailman.yml
+
3
−
3
View file @
dafa3685
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
roles/nginx/tasks/main.yml
+
7
−
0
View file @
dafa3685
...
...
@@ -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
This diff is collapsed.
Click to expand it.
roles/nginx
-mailman
/templates/
var/www/custom_
401.html.j2
→
roles/nginx/templates/
www/
401.html.j2
+
0
−
0
View file @
dafa3685
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment