Reputation: 371
I want to run multiple django project with multiple host name.
If use come from www.momsy.org, it goes to /var/web/momsy.git.org other if come from www.momsy.net, it goes to /var/web/momsy.git.net
This is to log and analyze where he/she came from.
So, following does not work because [WSGIPythonPath cannot occur within section].
But I can't use http.conf because i need 'servername' variable.
How Can I solve this problem?
ServerAdmin webmaster@localhost
ServerName www.momsy.org
WSGIScriptAlias / /home/web/momsy.git.kr/momsy/wsgi.py
WSGIPythonPath /home/web/momsy.git.kr
<Directory /home/web/momsy.git.kr/momsy>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
A
Upvotes: 0
Views: 119
Reputation: 58563
Use daemon mode, delegate each Django instance to a separate set of processes, and set python-path against each daemon process group as required for each. See:
Otherwise set the sys.path in the WSGI script file and not in the Apache configuration.
Upvotes: 1