If you don't mind me jumping in here, I have a followup question (related
context: I'm a django newb, this is day 3 for me) -- if you use ServerAlias,
how do you specifically set django to recognize the different subdomains
when a website is accessed? The urlpatterns seem to only match everything
after the domain.

-Steven

On Wed, Apr 14, 2010 at 5:53 PM, Austin Gabel <aga...@gmail.com> wrote:

> I'm assuming you are running all three of these projects on the same
> machine.  You can use the ServerAlias directive in your config.  It would
> look something like this
>
>
> <VirtualHost *:80>
> ServerName host1.domain.com
> ServerAlias host2.domain.com host3.domain.com
>
> DocumentRoot /var/www/whatever/
> WSGIScriptAlias /host1stuff /home/django/django.wsgi
> </VirtualHost>*
>
>
> *
> On Wed, Apr 14, 2010 at 2:58 PM, mw <mwolff...@gmail.com> wrote:
>
>> Hello,
>>
>> I have multiple virtual hosts pointing to the same Django project.
>>
>> So something like:
>>
>> host1.domain.com
>> host2.domain.com
>> host3.domain.com
>>
>> each point to the same Django project because although it was required
>> that host1 host2 and host3 should get their own hostnames, none of web
>> apps the various hosts need really required a whole new Django
>> project.  Essentially then, each hostname has its own application in
>> one Django project.  This is fine and everything is working, but I
>> feel like there is probably a WAY better way of doing this.
>>
>> For example, one ugly part is the resulting Apache configuration which
>> goes something like
>>
>> <VirtualHost *:80>
>> ServerName host1.domain.com
>> DocumentRoot /var/www/whatever/
>> WSGIScriptAlias /host1stuff /home/django/django.wsgi
>> </VirtualHost>
>>
>> and then similarly for host2
>>
>> <VirtualHost *:80>
>> ServerName host2.domain.com
>> DocumentRoot /var/www/whatever2/
>> WSGIScriptAlias /host2stuff /home/django/django.wsgi
>> </VirtualHost>
>>
>> and you can imagine how gross this can get.
>>
>> Any recommendations, thoughts, sage-like advice?
>>
>> Thanks in advance
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to