Hello,

I have a good picture of the problem and I have revamped Plinth's Apache
configuration to fix various problems.  The pull request is waiting for
review.

https://github.com/freedombox/Plinth/pull/25

The attached patch cleans up Plinth's Apache configuration in
freedombox-setup.

This bug will be fixed in Plinth's upstream and freedombox-setup package.

-- 
Sunil
From 0078a6a24c5e1961d5cd17f9a9956550818ddcb2 Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa <su...@medhas.org>
Date: Mon, 17 Nov 2014 14:30:48 +0530
Subject: [PATCH] Cleanup Plinth's Apache configuration

- Plinth related SSL redirection is no longer required in fbx.conf.

- Plinth no-longer hijacks default SSL site configuration.  Enable
  default SSL site configuration to compensate.

- Plinth's deault configuration works just fine, don't disable it.

- The change is need for the latest Plinth's Apache configuration
  changes at https://github.com/freedombox/Plinth/pull/25

- Newer version of FreedomBox setup should depend on Plinth > 0.4.1.
---
 debian/changelog   |  6 ++++++
 setup.d/90_apache2 | 12 +-----------
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4df0d71..40f4f69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,11 @@
 freedombox-setup (0.3) UNRELEASED; urgency=low
 
+  [ Sunil Mohan Adapa ]
+  * Cleanup Plinth's Apache configuration.  Default SSL site is no
+    longer hijacked.  Plinth supplied configuration is good enough
+    don't interfere.
+
+  [ Petter Reinholdtsen ]
   * Adjust debian/tests/test-chroot to build using unstable instead of
     testing.  We are focusing on unstable for now.
 
diff --git a/setup.d/90_apache2 b/setup.d/90_apache2
index 3ff6405..10b32f9 100755
--- a/setup.d/90_apache2
+++ b/setup.d/90_apache2
@@ -13,11 +13,6 @@ a2enmod ssl
 # disable default site
 a2dissite 000-default
 
-# disable plinth, if plinth-ssl is enabled
-if [ -e /etc/apache2/sites-enabled/plinth-ssl.conf ] ; then
-    a2dissite plinth
-fi
-
 # setup freedombox site
 cat > /etc/apache2/sites-available/fbx.conf <<'EOF'
 <VirtualHost *:80>
@@ -36,15 +31,10 @@ cat > /etc/apache2/sites-available/fbx.conf <<'EOF'
   <Proxy *>
     Allow from all
   </Proxy>
-
-  ## Send plinth to HTTPS port handled by plinth.conf.
-  RewriteEngine on
-  ReWriteCond %{REQUEST_URI} ^/plinth
-  ReWriteCond %{SERVER_PORT} !^443$
-  RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
 </VirtualHost>
 EOF
 
 a2ensite fbx
+a2ensite default-ssl
 
 echo "Done configuring Apache."
-- 
2.1.1

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to