From 090fad6a019cccd3cfc69b8f2d9036de5b026cd7 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Thu, 7 Apr 2016 20:51:56 +0200 Subject: [PATCH] Fix web vhost and software dependencies. --- roles/web/files/vhost | 21 +++++++++++++++++++-- roles/web/tasks/main.yml | 8 ++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/roles/web/files/vhost b/roles/web/files/vhost index 0f6ff56..6d25533 100644 --- a/roles/web/files/vhost +++ b/roles/web/files/vhost @@ -6,12 +6,12 @@ server { location /.well-known/acme-challenge/ { default_type "text/plain"; - root /var/www/acme-challenge/; + alias /var/www/acme-challenge/; } location / { return 301 https://www.binary-kitchen.de$request_uri; - } + } } server { @@ -24,4 +24,21 @@ server { ssl_certificate /etc/nginx/ssl/www.binary-kitchen.de.crt; root /var/www/kitchen; + + client_max_body_size 32M; + + index index.php; + + location ~ /wiki/(data/|conf/|bin/|inc/|install.php) { + deny all; + } + + location ~ \.php(?:$|/) { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_intercept_errors on; + } } diff --git a/roles/web/tasks/main.yml b/roles/web/tasks/main.yml index 8a47658..a58c7fe 100644 --- a/roles/web/tasks/main.yml +++ b/roles/web/tasks/main.yml @@ -1,7 +1,11 @@ --- -- name: Install php5-fpm - apt: name=php5-fpm state=present +- name: Install dependencies + apt: name={{ item }} state=present + with_items: + - php5-fpm + - php5-ldap + - php5-sqlite - name: Create vhost directory file: path=/var/www/kitchen state=directory owner=www-data group=www-data