pythondjangoapachewebfaction

multiple django projects on one application in webfaction


I am using a webfaction server and i am new to the server side. Now i had three django projects with three domains and one application in webfaction. So is any way that i can run three django projects with three different domains in one application. i had changed httpd.conf by placing virtual host in it. But it did not work. thanks in advance

This is what i had been tried

KeepAlive Off
SetEnvIf X-Forwarded-SSL on HTTPS=1
ServerLimit 1
StartServers 1
MaxRequestWorkers 5
MinSpareThreads 1
MaxSpareThreads 3
ThreadsPerChild 5

#WSGIDaemonProcess application processes=2 threads=12 python-path=/home/device_name/webapps/application:/home/device_name/webapps/application/project_name:/home/device_name/webapps/application/lib/python2.7
#WSGIProcessGroup application
#WSGIRestrictEmbedded On
#WSGILazyInitialization On
#WSGIScriptAlias / /home/device_name/webapps/application/project_name/project_name/wsgi.py

# Virtual hosts setup
NameVirtualHost *
<VirtualHost *>
ServerName application.com

WSGIDaemonProcess application processes=5 python-path=/home/device_name/webapps/application:/home/device_name/webapps/application/project_name:/home/device_name/webapps/application/lib/python2.7 threads=1
WSGIProcessGroup application
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIScriptAlias / /home/device_name/webapps/application/project_name/project_name/wsgi.py
</VirtualHost>

<VirtualHost *>
ServerName dreamhomeconsultancy.in

WSGIDaemonProcess APPLICATION_NAME_www processes=5 python-path=/home/device_name/webapps/application:/home/device_name/webapps/application/civilengg:/home/device_name/webapps/application/lib/python2.7 threads=1
WSGIProcessGroup civilengg
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIScriptAlias / /home/device_name/webapps/application/civilengg/civilengg/wsgi.py
</VirtualHost>

Solution

  • sorry I am typing this on my mobile so I cannot elaborate on this to much.

    I have found a bookmark of a very usefull article and this helped me get my webfaction setup running:

    http://michal.karzynski.pl/blog/2013/09/14/django-in-virtualenv-on-webfactions-apache-with-mod-wsgi/

    I hope this helps. If you need more help let me know your actual setup.

    Good ouck!