Created
October 31, 2013 01:23
-
-
Save jvalleroy/7243082 to your computer and use it in GitHub Desktop.
Get Plinth HTTPS to function correctly with jwchat site enabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/apache2/sites-available/jwchat.conf b/apache2/sites-available/jwchat.conf | |
index d67df9c..4fb38d2 100644 | |
--- a/apache2/sites-available/jwchat.conf | |
+++ b/apache2/sites-available/jwchat.conf | |
@@ -10,5 +10,11 @@ | |
<Proxy *> | |
Allow from all | |
</Proxy> | |
+ | |
+ ## Force SSL for Plinth | |
+ RewriteEngine on | |
+ ReWriteCond %{REQUEST_URI} ^/plinth | |
+ ReWriteCond %{SERVER_PORT} !^443$ | |
+ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] | |
</VirtualHost> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment