I posted this on Stackoverflow and then saw that this group may be the preferred place to post a question.
I want to deploy multiple Django projects on one server.
It is Windows 32 bit Xampp. mod_wsgi is 32 bit. python is 32 bit.
Django is ver 1.7.3.
I have read lots of posts and tried many things but I can't get past this problem.
The following error shown in the browser also indicates some version info.
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
Error 500
localhost Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19 mod_wsgi/3.5 Python/2.7.6
Software Versions:
mod_WSGI - win 32bit
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
mod_wsgi-3.5.ap24.win32-py2.7.zip
Python - win 32 bit
https://www.python.org/download/releases/2.7.6/
https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
Xampp Windows
32bit ver 1.8.2
I can successfully deploy one django application this way. There are no errors if I only deploy one, for example
c:/p2/xampp/htdocs/django/mysite
When I add the second project to wsgi3.conf I get the below error and only the first project continues to work.
I get the following error in the apache error.log.
mod_wsgi (pid=11184): Exception occurred processing WSGI script 'C:/p2/xampp/htdocs/django/apache/django161c.wsgi'.
~~~~~ some lines removed ~~~~~~
ImportError: Could not import settings 'mysite.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named mysite.settings
_____________
Last two lines of My httpd.conf:
LoadModule wsgi_module modules/mod_wsgi.so
Include C:/p2/xampp/htdocs/django/apache/wsgi3.conf
_____________
My wsgi3.conf
############
listen 8986
<VirtualHost *:8986>
Alias /static/ c:/p2/xampp/htdocs/django/mysite/static/
WSGIScriptAlias / "c:/p2/xampp/htdocs/django/apache/mysite.wsgi"
DocumentRoot "c:/p2/xampp/htdocs/django/mysite"
ServerName 127.0.0.1
<Directory "c:/p2/xampp/htdocs/django/apache">
Allow from all
</Directory>
</VirtualHost>
############
listen 8985
<VirtualHost *:8985>
WSGIScriptAlias / "c:/p2/xampp/htdocs/django/apache/django161c.wsgi"
DocumentRoot "c:/p2/xampp/htdocs/django/django161c"
ServerName 127.0.0.1
<Directory "c:/p2/xampp/htdocs/django/apache">
Allow from all
</Directory>
</VirtualHost>
_____________
My mysite.wsgi:
import os, sys
sys.path.append('c:/p2/xampp/htdocs/django/mysite')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
# works: https://www.pythonanywhere.com/forums/topic/1629/ # this is for changes to django 1.7 # 2015-01-23_Fri_14.13-PM
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
_____________
My django161c.wsgi
import os, sys
sys.path.append('c:/p2/xampp/htdocs/django/django161c')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
_____________
Can you help me?