diff --git a/templates/etc-apache2-conf-available-php5-fpm b/templates/etc-apache2-conf-available-php5-fpm deleted file mode 100644 index 70a9ba8876e81eaf27b784f259569d852305d5e4..0000000000000000000000000000000000000000 --- a/templates/etc-apache2-conf-available-php5-fpm +++ /dev/null @@ -1,10 +0,0 @@ -<IfModule mod_fastcgi.c> - AddHandler php5-fcgi .php - Action php5-fcgi /php5-fcgi - Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi - FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization - - <Directory /usr/lib/cgi-bin> - Include /etc/apache2/{{ apache_conf_dir }}/global-deny.conf - </Directory> -</IfModule> diff --git a/templates/etc-apache2-sites-available-default b/templates/etc-apache2-sites-available-default index 5c932e871ddc36e332169bd94ce8f300eaa48c56..88d0208559c782fc3f7459f3b65b048d0e656ff3 100644 --- a/templates/etc-apache2-sites-available-default +++ b/templates/etc-apache2-sites-available-default @@ -3,11 +3,13 @@ ServerAdmin {{apache_server_admin}} +{% if not php_fpm_socket|default(false) %} ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www{{apache_server_default_root}}/$1 ProxyTimeout 900 <Proxy fcgi://127.0.0.1:9000> ProxySet connectiontimeout=5 timeout=900 retry=3 </Proxy> +{% endif %} DocumentRoot /var/www{{apache_server_default_root}} <Directory />