From 7034c8e00d7ed513c5542ce0f12b6502245e11ee Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Tue, 20 Jan 2015 17:31:59 -0500 Subject: [PATCH] Initial fix for apache 2.4 vhost file --- install | 7 ++++++- installer/apache/airtime-vhost | 2 -- installer/apache/airtime-vhost-2.4 | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 installer/apache/airtime-vhost-2.4 diff --git a/install b/install index a07b15251..7e6351030 100755 --- a/install +++ b/install @@ -326,7 +326,12 @@ if [ "$apache" = "t" ]; then if [ ! -f /etc/apache2/sites-available/${airtimeconfigfile} ]; then verbose "\n * Creating Apache config for Airtime..." - sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost > /etc/apache2/sites-available/${airtimeconfigfile} + + if [ "$apacheversion" != "1" ]; then + sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost-2.4 > /etc/apache2/sites-available/${airtimeconfigfile} + else + sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost > /etc/apache2/sites-available/${airtimeconfigfile} + fi loudCmd "a2dissite 000-default" loudCmd "a2ensite airtime" else diff --git a/installer/apache/airtime-vhost b/installer/apache/airtime-vhost index bc6d8a85f..22c54d8b5 100644 --- a/installer/apache/airtime-vhost +++ b/installer/apache/airtime-vhost @@ -13,7 +13,5 @@ # Apache instance is behind a proxy, so set these here UseCanonicalName On UseCanonicalPhysicalPort On - - Require all granted diff --git a/installer/apache/airtime-vhost-2.4 b/installer/apache/airtime-vhost-2.4 new file mode 100644 index 000000000..bc6d8a85f --- /dev/null +++ b/installer/apache/airtime-vhost-2.4 @@ -0,0 +1,19 @@ + + ServerAdmin foo@bar.org + DocumentRoot WEB_ROOT + php_admin_value upload_tmp_dir /tmp + + + DirectoryIndex index.php + AllowOverride all + Order allow,deny + Allow from all + + # PHP's server values can be spoofed or incorrect if an + # Apache instance is behind a proxy, so set these here + UseCanonicalName On + UseCanonicalPhysicalPort On + + Require all granted + +