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
f7b5fc94
Commit
f7b5fc94
authored
9 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Bug fixes and allow http auth
parent
18e5bc61
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/drupal.yml
+13
-2
13 additions, 2 deletions
tasks/drupal.yml
templates/etc_apache2_sites_available_vhost
+23
-16
23 additions, 16 deletions
templates/etc_apache2_sites_available_vhost
with
36 additions
and
18 deletions
tasks/drupal.yml
+
13
−
2
View file @
f7b5fc94
...
...
@@ -80,7 +80,7 @@
-
name
:
"
Drupal
|
Apache
configuration
file
for
our
site(s)"
template
:
src=etc_apache2_sites_available_vhost
dest=/etc/apache2/sites-available/{{ item.apache_site }}
dest=/etc/apache2/sites-available/{{ item.apache_site }}
{{ apache_conf_ext }}
owner=root
group=root
mode=0664
...
...
@@ -90,8 +90,19 @@
-
"
Apache
|
Restart
Apache"
-
name
:
"
Drupal
|
Apache
enable
our
new
site(s)"
command
:
a2ensite {{ item.apache_site }} creates=/etc/apache2/sites-enabled/{{ item.apache_site }}
command
:
a2ensite {{ item.apache_site }} creates=/etc/apache2/sites-enabled/{{ item.apache_site }}
{{ apache_conf_ext }}
with_items
:
drupal_settings
when
:
item.apache_site
notify
:
-
"
Apache
|
Restart
Apache"
-
name
:
"
Drupal
|
Setup
AuthType
Basic"
htpasswd
:
path="/var/www/passwords/{{ item.apache_auth.user }}"
name="{{ item.apache_auth.user }}"
password="{{ item.apache_auth.password }}"
owner=www-data
group=www-data
mode=640
with_items
:
drupal_settings
when
:
item.apache_auth is defined
This diff is collapsed.
Click to expand it.
templates/etc_apache2_sites_available_vhost
+
23
−
16
View file @
f7b5fc94
<VirtualHost *:80>
ServerAdmin {{ apache_server_admin }}
ServerName {{ item.domains.0.domain }}
ServerAlias{% for domain in item.domains %} {{ domain.domain }}{% for alias in domain.aliases %} {{ alias }}{% endfor %}{% endfor %}
ServerAdmin {{ apache_server_admin }}
ServerName {{ item.domains.0.domain }}
ServerAlias{% for domain in item.domains %} {{ domain.domain }}{% for alias in domain.aliases %} {{ alias }}{% endfor %}{% endfor %}
DocumentRoot /var/www/{{ item.root }}
DocumentRoot /var/www/{{ item.root }}
<Directory /var/www/{{ item.root }}/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/{{ item.root }}/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
{% if item.apache_auth is defined %}
AuthType {{ item.apache_auth.type }}
AuthName "{{ item.apache_auth.name }}"
AuthUserFile /var/www/passwords/{{ item.apache_auth.user }}
Require user {{ item.apache_auth.user }}
{% else %}
Order allow,deny
allow from all
{% endif %}
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log proxy env=forwarded
</VirtualHost>
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