Hi,

I have been asking this already over at the Django group, but could not 
find a solution there, so I was directed here...

I'm currently trying to get the same Django app running twice under 
different URLs on the same server.

Server Details: Apache/2.2.24 (Win32), mod_wsgi/3.3, Python/2.7.5 on 
Windows 2008

App 1 ran last year under https://www.sample.com/2013/app and should stay 
there for reference purposes.

App 2 should run under https://www.sample.com/2014/app and also should use 
a different code base and different database than last years version.

I tried the following settings in httpd.conf, but regardless if I use the 
2013 or 2014 url, I always get the 2013 version of the application... 

I also changed the database setting in the 2014 version in settings.py, but 
it seems as if this is never executed. 

Below the relevant parts from httpd.conf and wsgi.py, I also tried to use 
os.environ['DJANGO_SETTINGS_
MODULE'] = 'app.settings' in wsgi.py without success.


#
# WSGI / Django Configuration
<IfModule wsgi_module>
    WSGIApplicationGroup %{GLOBAL}
    
    WSGIScriptAlias /2013/app "D:/dev/app/app/wsgi.py"
    WSGIScriptAlias /2014/app "D:/dev/app.2014/app/wsgi.py"
    
    WSGIPythonPath "D:/dev/app"

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

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

    Alias /static "D:/wwwroot/app/static/"
    Alias /static2014 "D:/wwwroot/app.2014/static/"
    Header set X-XSS-Protection 0
</IfModule>


WSGI.PY:

import os

activate_this = 'D:/Python27/.virtualenvs/djellis/Scripts/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to