summaryrefslogtreecommitdiffstats
path: root/roles/ccsdb
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2017-05-31 10:37:42 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2017-05-31 10:37:42 +0200
commitb36d12b497da683b14f5d24aedcdb45496c352a6 (patch)
tree062dd5be486c3b2b55c63d1dd64d4dee88f14da7 /roles/ccsdb
parent6eb8e901e2f15755b0f853abbec2569c4f6f86c9 (diff)
downloadansible-b36d12b497da683b14f5d24aedcdb45496c352a6.tar.gz
ansible-b36d12b497da683b14f5d24aedcdb45496c352a6.tar.xz
ansible-b36d12b497da683b14f5d24aedcdb45496c352a6.zip
Add the ccsdb.conf apache config file
Diffstat (limited to 'roles/ccsdb')
-rw-r--r--roles/ccsdb/templates/ccsdb.conf27
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/ccsdb/templates/ccsdb.conf b/roles/ccsdb/templates/ccsdb.conf
new file mode 100644
index 000000000..7863c4fcf
--- /dev/null
+++ b/roles/ccsdb/templates/ccsdb.conf
@@ -0,0 +1,27 @@
+WSGIDaemonProcess ccsdb user=apache group=apache threads=5
+WSGIScriptAlias /{{ ccsdb_endpoint }} /usr/share/ccsdb/ccsdb.wsgi
+WSGISocketPrefix run/wsgi
+
+# this isn't the best way to force SSL but it works for now
+#RewriteEngine On
+#RewriteCond %{HTTPS} !=on
+#RewriteRule ^/execdb/admin/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+
+<Directory /usr/share/ccsdb>
+ WSGIProcessGroup ccsdb
+ WSGIApplicationGroup %{GLOBAL}
+ WSGIScriptReloading On
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ <RequireAny>
+ Require method GET
+ Require ip 127.0.0.1 ::1{% for host in allowed_hosts %} {{ host }}{% endfor %}
+
+ </RequireAny>
+ </IfModule>
+ <IfModule !mod_auth_core.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+
+</Directory>