diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-02-12 17:16:49 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-02-12 17:16:49 +0100 |
commit | be209ddf7e03e21a399cb595ddf50a67083345a0 (patch) | |
tree | 587e0095878c62439618c937d20e44de1a66cbb5 | |
parent | 10ed268cc90a532421542b53d469837d08f562fd (diff) |
Fixed Apache conf and permission.
Change-Id: I6dc0de950ebf5998d1f6995c1e55aea6bc80775b
-rw-r--r-- | ansible/roles/status/tasks/ssl-certificates.yml | 2 | ||||
-rw-r--r-- | ansible/roles/status/templates/apache_website.conf | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ansible/roles/status/tasks/ssl-certificates.yml b/ansible/roles/status/tasks/ssl-certificates.yml index d84591f..a9386c0 100644 --- a/ansible/roles/status/tasks/ssl-certificates.yml +++ b/ansible/roles/status/tasks/ssl-certificates.yml @@ -3,7 +3,7 @@ # in the local secrets.yml file. Refer to the README. - name: apache-ssl-certs - copy: src={{ item }} dest=/etc/ssl/certs/ owner=root group=root mode=0644 + copy: src={{ item }} dest=/etc/ssl/certs/ owner=root group=root mode=0444 with_items: openssl_certs tags: - ssl-certs diff --git a/ansible/roles/status/templates/apache_website.conf b/ansible/roles/status/templates/apache_website.conf index a691c20..69aa1eb 100644 --- a/ansible/roles/status/templates/apache_website.conf +++ b/ansible/roles/status/templates/apache_website.conf @@ -15,6 +15,12 @@ WSGILazyInitialization On CustomLog ${APACHE_LOG_DIR}/{{ site_name }}-access.log combined ErrorLog ${APACHE_LOG_DIR}/{{ site_name }}-error.log +{% if role == 'staging' %} + RewriteEngine On + RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC] + RewriteRule .* - [R=403,L] +{% endif %} + KeepAlive On KeepAliveTimeout 9 MaxKeepAliveRequests 150 |