I am using mod_wsgi in embedded mode and attempting to make an Apache configuration that will not require any VirtualHost changes to deploy new Django sites (similar to the concept of dynamically configured mass virtual hosting http://httpd.apache.org/docs/2.2/vhosts/mass.html ). All that would be required is to create a new folder, such as /usr/ local/django/_SERVER_NAME_/ ... and then it will Just Work. At least, that is the goal.
I've tried many variations of the following (kind of ugly) configuration options: # Causes the server name to be obtained from the client's Host headers, instead of the ServerName directive UseCanonicalName Off RewriteEngine On # ServerName derived from a Host: header may be in any case RewriteMap lowercase int:tolower RewriteRule . - [E=wsgiservername:${lowercase:%{SERVER_NAME}}] WSGIScriptAlias / /usr/local/django/%{ENV:wsgiservername}/apache/ django.wsgi <Directory /usr/local/django/%{ENV:wsgiservername}/apache> Order deny,allow Allow from all </Directory> The error log always says something like: Target WSGI script not found or unable to stat: /usr/local/django/% {ENV:wsgiservername} I'm assuming then that WSGIScriptAlias doesn't parse environment variables? Though, I'm probably terribly misunderstanding the order that Apache follows when interpreting directives. Is there a way to do this with a WSGIScriptAliasMatch? The problem I see is that the requested path doesn't contain the server name, so a regex can't pull it out. Perhaps a RewriteRule can mangle the path and put the ServerName in? :/ WSGIScriptAliasMatch ^( **can the ServerName ever exist here?**)/ /usr/ local/django/$1/apache/django.wsgi That seems to be the cleanest way to do it, if something like that would work (is there potential here for a new directive, such as WSGIVirtualScriptAlias?). Any ideas would be much appreciated ... thank you! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---