From 2c169bc02d3136ec9bb80bc8249d9209fceb3ab2 Mon Sep 17 00:00:00 2001 From: Rajani Karuturi Date: Fri, 9 Jan 2015 09:16:00 +0530 Subject: [PATCH] volume-upload added a upload url redirect in apache conf rewrite engine is on only in the case fo SSVM --- .../debian/config/etc/apache2/sites-available/default-ssl | 5 +++++ systemvm/patches/debian/config/etc/init.d/cloud-early-config | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/systemvm/patches/debian/config/etc/apache2/sites-available/default-ssl b/systemvm/patches/debian/config/etc/apache2/sites-available/default-ssl index 0eea44d0103..5cc236e98a3 100644 --- a/systemvm/patches/debian/config/etc/apache2/sites-available/default-ssl +++ b/systemvm/patches/debian/config/etc/apache2/sites-available/default-ssl @@ -168,5 +168,10 @@ # MSIE 7 and newer should be able to use keepalive BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + RewriteEngine Off + RewriteCond %{HTTPS} =on + RewriteCond %{REQUEST_METHOD} =POST + RewriteRule ^/upload/(.*) http://localhost:8210/upload?uuid=$1 [P,L] + diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 9942f2df0d5..e835a7ec76f 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -1155,6 +1155,10 @@ setup_secstorage() { setup_sshd $ETH0_IP "eth0" fi setup_apache2 $ETH2_IP + a2enmod proxy + a2enmod proxy_http + [ -f /etc/apache2/sites-available/default-ssl ] && sed -i -e "s/RewriteEngine Off/RewriteEngine On/" /etc/apache2/sites-available/default-ssl + service apache2 restart disable_rpfilter enable_fwding 0