Bouncing this back onto list for general interest.

2009/3/15 [email protected] <[email protected]>:
>
> Been meaning to do this for ages now. Thanks Graham for all your help
> in other posts about this. Anyhow, following on from the thread as
> mentioned above, script below includes media handling, using
> VirtualDocumentRoot as mentioned above. The hard work was really
> already done above and this one has been modified to handle
> subdomains, using the subdomain name to identify the relevant
> folders.
>
> I only just got it work and have posted it in a slightly overexcited
> way so probably needs tidying and strengthening. But any obvservations
> most welcome (yup favicon not handled), thanks:
>
> RewriteEngine on
> RewriteMap tolower int:tolower
>
> VirtualDocumentRoot /home/sites/static/%1/
>
> <Directory /home/sites/static/* >
> Order deny,allow
> Allow from all
> </Directory>
>
> RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.co\.uk$ [NC]
> RewriteRule . - [E=subdomain:%1]
>
> RewriteCond %{REQUEST_URI} !^/media/*
> RewriteCond %{REQUEST_URL} !^favicon.ico
> RewriteRule ^/(.*) /home/sites/init/modwsgi/${tolower:%
> {ENV:subdomain}}/django.wsgi/$1
> RewriteRule . - [E=APPLICATION_GROUP:${tolower:%{SERVER_NAME}}]
>
> WSGIProcessGroup %{GLOBAL}
> WSGIApplicationGroup %{ENV:subdomain}
>
> <Directory /home/sites/init/modwsgi/* >
> Order allow,deny
> Allow from all
> Options ExecCGI
> AddHandler wsgi-script .wsgi
> </Directory>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to