Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
drupal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
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
Ansible
Roles
drupal
Commits
609dfdec
Commit
609dfdec
authored
5 years ago
by
Eric Zillmann
Browse files
Options
Downloads
Patches
Plain Diff
ansible-inventories/arocom#2856 proposal for a more generic approach for ips and users
parent
f8c1ff8b
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
Master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/vhost.conf
+15
-8
15 additions, 8 deletions
templates/vhost.conf
with
15 additions
and
8 deletions
templates/vhost.conf
+
15
−
8
View file @
609dfdec
...
...
@@ -89,22 +89,30 @@
{%
if
drupal_domain
.
apache_auth
is
defined
and
drupal_domain
.
apache_auth
.
active
|
default
(
'true'
) ==
'true'
%}
AuthType
{{
drupal_domain
.
apache_auth
.
type
}}
AuthName
"{{ drupal_domain.apache_auth.name }}"
{%
if
drupal_domain
.
apache_auth
.
passwdfile
is
defined
%}
AuthUserFile
{{
webRoot
}}/
passwords
/{{
drupal_domain
.
apache_auth
.
passwdfile
}}
{%
else
%}
AuthUserFile
{{
webRoot
}}/
passwords
/{{
drupal_domain
.
apache_auth
.
user
}}
{%
if
drupal_domain
.
apache_auth
.
ips
is
defined
%}
{%
for
ip
in
drupal_domain
.
apache_auth
.
ips
%}
SetEnvIF
X
-
Forwarded
-
For
^{{
ip
|
regex_escape
() }}$
AllowIP
{%
endfor
%}
{%
endif
%}
{%
if
drupal_domain
.
apache_auth
.
manual_auth
is
defined
%}
{{
drupal_domain
.
apache_auth
.
manual_auth
}}
{%
else
%}
{%
if
drupal_domain
.
apache_auth
.
extra_users
is
defined
%}
{%
if
drupal_domain
.
apache_auth
.
extra_users
is
defined
or
drupal_domain
.
apache_auth
.
ips
is
defined
%}
<
RequireAny
>
{%
if
drupal_domain
.
apache_auth
.
extra_users
is
defined
%}
{%
for
user
in
drupal_domain
.
apache_auth
.
extra_users
%}
<
RequireAll
>
{%
if
user
.
expression
is
defined
%}
Require
expr
"{{ user.expression }}"
{%
endif
%}
Require
user
{{
user
.
user
}}
</
RequireAll
>
{%
endfor
%}
{%
endif
%}
{%
if
drupal_domain
.
apache_auth
.
ips
is
defined
%}
Require
env
AllowIP
{%
for
ip
in
drupal_domain
.
apache_auth
.
ips
%}
Require
ip
{{
ip
}}
{%
endfor
%}
{%
endif
%}
<
RequireAll
>
Require
{%
if
drupal_domain
.
apache_auth
.
password
is
defined
%}
user
{{
drupal_domain
.
apache_auth
.
user
}}{%
else
%}
all
granted
{%
endif
%}
...
...
@@ -113,7 +121,6 @@
{%
else
%}
Require
user
{{
drupal_domain
.
apache_auth
.
user
}}
{%
endif
%}
{%
endif
%}
{%
else
%}
{%
if
apache_version
|
default
(
'2.4'
) ==
'2.2'
%}
Order
allow
,
deny
...
...
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