From c9863bc0f8270ec16f05c6edb614ca285feaa890 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Tue, 20 Dec 2011 20:50:58 -0500 Subject: [PATCH] subdomain for plinth --- share/apache2/plinth.conf | 40 +++++++++++++++++++++++++++++++-------- static/static | 1 + 2 files changed, 33 insertions(+), 8 deletions(-) create mode 120000 static/static diff --git a/share/apache2/plinth.conf b/share/apache2/plinth.conf index 7046b10d9..6f0612f6a 100644 --- a/share/apache2/plinth.conf +++ b/share/apache2/plinth.conf @@ -1,11 +1,35 @@ -ProxyPass /plinth/ http://localhost:8000/ - -Options Indexes FollowSymLinks + + DocumentRoot /dev/null + ServerName plinth -RewriteEngine on -RewriteRule [^/]*/plinth$ plinth/ [R] -RewriteRule [^/]*/$ plinth/ [R] -#RewriteRule ^$ plinth/ [R] + ## Force ssl + RewriteEngine on + ReWriteCond %{SERVER_PORT} !^443$ + RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] + + + + + DocumentRoot /home/james/src/plinth/static + ServerName plinth + + SSLEngine on + SSLCertificateFile /etc/apache2/ssl/apache.pem + + ## Use a rule like this to hang plinth off a subdir + #RewriteEngine on + #RewriteRule ^/plinth/(.*)$ http://localhost:8000/$1 [P,L] + #Use the following to debug rewrite rules + #RewriteLog "/var/log/apache2/rewrite.log" + #RewriteLogLevel 9 + + ## Use proxy directives to hand plinth off a domain or subdomain + ProxyPass /static ! + ProxyPass / http://localhost:8000/ + ProxyPassReverse / http://localhost:8000/ + + allow from all + + - diff --git a/static/static b/static/static new file mode 120000 index 000000000..945c9b46d --- /dev/null +++ b/static/static @@ -0,0 +1 @@ +. \ No newline at end of file