How to host multiple instances of the same app with Windows Apache & WSGI?

56 views
Skip to first unread message

DJ-Tom

unread,
Feb 25, 2014, 7:02:22 AM2/25/14
to django...@googlegroups.com
Hi,

currently I'm using the following configuration to host a Django appliaction:

# WSGI Configuration
<IfModule wsgi_module>
    WSGIScriptAlias /2013/spcmanage "D:/dev/spcmanage/spcmanage/wsgi.py"
    WSGIPythonPath "D:/dev/spcmanage"

    <Directory D:/dev/spcmanage>
        <Files wsgi.py>
            Order deny,allow
            Allow from all
        </Files>
    </Directory>

    Alias /static "D:/wwwroot/spcmanage/static/"
</IfModule>

Now I need to host the same application for another project, but with a different database and under a different URL, e.g. htts://www.domain.com/2014/spcmanage

But the application from 2013 should be working as well.

Is it sufficient to just add another WSGIScriptAlias line like below?

    WSGIScriptAlias /2014/spcmanage "D:/dev/2014/spcmanage/spcmanage/wsgi.py"

But what about the alias for the /static directory?

Thomas

Frank Bieniek

unread,
Feb 25, 2014, 7:10:00 AM2/25/14
to django...@googlegroups.com
Hi Tom,
if I would walk in your shoes,
duplicate the source in different folders,
so you do not create a single point of failure.
If you mess in one project the other one behaves the same, as long as you do not deploy again...

If you would run in linux I would have said,
create different symlinks and use different wsgi files. (wsgi file uses different settings)

But I am not an dev ops guy
Thanks
Frank
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bc15e1ba-efae-4161-ac95-2b570e4430a0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

DJ-Tom

unread,
Feb 25, 2014, 7:36:51 AM2/25/14
to django...@googlegroups.com


Am Dienstag, 25. Februar 2014 13:10:00 UTC+1 schrieb Frank Bieniek:
Hi Tom,
if I would walk in your shoes,
duplicate the source in different folders,
so you do not create a single point of failure.


This is exactly  what I'm after, I'm using a version control system so it is easy for me to create an independent branch for the new project.

So the old project will stay at D:/dev/spcmanage/spcmanage/, the new one should go to D:/dev/2014/spcmanage/spcmanage/

I just don't know how to configure that with Apache under Windows...


Tom Evans

unread,
Feb 25, 2014, 7:50:11 AM2/25/14
to django...@googlegroups.com
Yes

>
> But what about the alias for the /static directory?
>

Use different STATIC_ROOT for each site, eg /static2013 and /static2014.

But what you should really be doing is putting this in to a separate
vhost. Domain names are cheap, sub-domains are even cheaper.

Cheers

Tom

DJ-Tom

unread,
Feb 27, 2014, 10:18:57 AM2/27/14
to django...@googlegroups.com, teva...@googlemail.com


Am Dienstag, 25. Februar 2014 13:50:11 UTC+1 schrieb Tom Evans:

Use different STATIC_ROOT for each site, eg /static2013 and /static2014.

But what you should really be doing is putting this in to a separate
vhost. Domain names are cheap, sub-domains are even cheaper.

Cheers

Tom

The access to the application has to be made via HTTPS - so I would have to get proper SSL certificates for each new domain. Which isn't cheap...

C. Kirby

unread,
Feb 27, 2014, 1:13:37 PM2/27/14
to django...@googlegroups.com, teva...@googlemail.com
You can get a wildcard cert that captures all of *.site.com|org|net|etc
Reply all
Reply to author
Forward
0 new messages