From 67d7187b2ddc4a699d465513f846ae74f212290b Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Fri, 4 Sep 2009 23:46:28 +0200 Subject: [PATCH] add example configurations for apache (shared/dedicated vhost) and lighttpd. fixes #21 --- etc/apache2/dedicated_vhost.conf | 26 ++++++++++++++++++++++ etc/apache2/shared_vhost.conf | 38 ++++++++++++++++++++++++++++++++ etc/lighttpd/lighttpd.conf | 35 +++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 etc/apache2/dedicated_vhost.conf create mode 100644 etc/apache2/shared_vhost.conf create mode 100644 etc/lighttpd/lighttpd.conf diff --git a/etc/apache2/dedicated_vhost.conf b/etc/apache2/dedicated_vhost.conf new file mode 100644 index 0000000..be8e357 --- /dev/null +++ b/etc/apache2/dedicated_vhost.conf @@ -0,0 +1,26 @@ + +# This is an example configuration file for Apache2 that creates +# a dedicated VirtualHost specifically for mumble-django. This is the +# recommended setup. + + + ServerName example.com + ServerAlias www.example.com + + AddDefaultCharset UTF-8 + + Alias /static/ /srv/mumble-django/htdocs/ + + # for Debian Lenny + Alias /media/ /usr/share/python-support/python-django/django/contrib/admin/media/ + # for Debian squeeze(unstable) + #Alias /media/ /usr/share/pyshared/django/contrib/admin/media/ + # if self-installed using setup.py + #Alias /media/ /usr/lib/python2.4/site-packages/django/contrib/admin/media/ + #Alias /media/ /usr/lib/python2.5/site-packages/django/contrib/admin/media/ + + WSGIScriptAlias / /srv/mumble-django/mumble-django.wsgi + WSGIDaemonProcess mumble-django threads=25 + WSGIProcessGroup mumble-django + WSGIScriptReloading Off + diff --git a/etc/apache2/shared_vhost.conf b/etc/apache2/shared_vhost.conf new file mode 100644 index 0000000..6a321fd --- /dev/null +++ b/etc/apache2/shared_vhost.conf @@ -0,0 +1,38 @@ + +# This is an example configuration file for Apache2 that you can use to integrate +# Mumble-Django into an existing VirtualHost and run it under the path /mumble-django. +# Although this should work, I recommend using a dedicated VirtualHost, which can +# easily be done using a subdomain. +# +# For example purposes, I put a complete VirtualHost configuration here. The part +# relevant for mumble-django is marked with comments. +# + + + ServerName example.com + ServerAlias www.example.com + + DocumentRoot /var/www + + AddDefaultCharset UTF-8 + + # -----------8<--------- cut here + + Alias /mumble-django/static/ /srv/mumble-django/htdocs/ + + # for Debian Lenny + Alias /mumble-django/media/ /usr/share/python-support/python-django/django/contrib/admin/media/ + # for Debian squeeze(unstable) + #Alias /mumble-django/media/ /usr/share/pyshared/django/contrib/admin/media/ + # if self-installed using setup.py + #Alias /mumble-django/media/ /usr/lib/python2.4/site-packages/django/contrib/admin/media/ + #Alias /mumble-django/media/ /usr/lib/python2.5/site-packages/django/contrib/admin/media/ + + WSGIScriptAlias /mumble-django /srv/mumble-django/mumble-django.wsgi + WSGIDaemonProcess mumble-django threads=25 + WSGIProcessGroup mumble-django + WSGIScriptReloading Off + + # ----------->8--------- cut here + + diff --git a/etc/lighttpd/lighttpd.conf b/etc/lighttpd/lighttpd.conf new file mode 100644 index 0000000..b4e5200 --- /dev/null +++ b/etc/lighttpd/lighttpd.conf @@ -0,0 +1,35 @@ +#!conf +# +# This configuration snippet has been donated by Anon in ticket #21 at: +# http://bitbucket.org/Svedrin/mumble-django/issue/21/fcgi-script-missing +# +# To run mumble-django, start the FastCGI server like so: +# python pyweb/manage.py runfcgi daemonize=false socket=/tmp/mumble-django.sock maxrequests=1 +# +# If lighttpd runs under a different user than the FastCGI daemon, make sure +# lighttpd can access the sockfile. +# +# Then, add this variable to settings.py: +# FORCE_SCRIPT_NAME = '' +# +# Now insert the configuration shown here into lighttpd.conf. +# + +server.document-root = "/usr/local/www/mumble-django" + alias.url = ( + "/static" => "/usr/local/www/mumble-django/htdocs/", + "/media" => "/usr/local/lib/python2.6/site-packages/django/contrib/admin/media/" + ) + url.rewrite-once = ( + "^(/media.*)$" => "$1", + "^(/static.*)$" => "$1", + "^(/.*)$" => "/mumble-django.fcgi$1", + ) + fastcgi.server = ( + "mumble-django.fcgi" => ( + "" => ( + "socket" => "/tmp/mumble-django.socket", + "check-local" => "disable" + ) + ) + )