I have setup a django website as referred to within the django paperwork: https://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/

Now I wish to setup another version from the site (different source dir, different database) to operate on a single server. You will find active customers and flex applications who use application #1, so I wish to keep application #1 access unchanged. I additionally rather not alter the web addresses.py whatsoever for application #2.

I believed of various port for application #2

For instance
http://192.168.1.1/load_book/123/ will load book from application #1 http://192.168.1.1:444/load_book/123/ will load book from application #2

I am a complete noob to Apache and WSGI... how do you arrange it?

Exactly what do you mean by they have a similar Web addresses? Exactly the same hostname, possibly?

Let us say you have 2 applications:

These may both be Django applications, offered by WSGI, on a single Apache instance. Using either Directory or Location directives inside your apache conf to specify the .wsgi loader file as referred to within the django paperwork linked above:

<Location /your_app>
    WSGIScriptAlias /your_app /path/to/mysite/apache/your_app/django.wsgi
    ...
</Location>
<Location /my_app>
    WSGIScriptAlias /my_app /path/to/mysite/apache/my_app/django.wsgi
    ...
</Location>

Really the only gotcha is the fact that you will need to tell your_app and my_app that they're no more around the document cause of the host. To get this done, give a base_url parameter for your settings.py and prefix all the records inside your urls.py with this particular param. This can ensure once the request comes through Apache, your python application can route it accordingly.

To have an easy illustration of how this is accomplished, take a look in the code for Bookworm, a Django application.

You are able to attatch the wsgi application to various sub-pathways underneath the same domain. Should you choose this the pathways towards the sights inside Django it's still exactly the same. You don't have to change the web addresses.py. Within the following example Django will regard /site1 because the cause of project1.

Take a look at http://code.google.com/p/modwsgi/wiki/InstallationInstructions for documentation on mod_wsgi.

<VirtualHost *:80>
    ServerName www.example.com

    WSGIDaemonProcess example
    WSGIProcessGroup example
    WSGIScriptAlias /site1 /home/django/project1/deploy/wsgi.py
    <Directory /home/django/project1/deploy>
        Order deny,allow
        Allow from all
    </Directory>

    WSGIScriptAlias /site2 /home/django/project2/deploy/wsgi.py
    <Directory /home/django/project2/deploy>
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

The two sites will run within the same daemon process using different python sub-interpreters.