webfaction 中一个应用程序上的多个 django 项目

multiple django projects on one application in webfaction

我正在使用 webfaction 服务器,我是服务器端的新手。现在我有三个 在 webfaction 中具有三个域和一个应用程序的 django 项目。因此,我可以 运行 在一个应用程序中使用三个不同域的三个 Django 项目。我通过在其中放置虚拟主机来更改 httpd.conf。但它没有用。提前致谢

这是我试过的

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>

抱歉,我是在手机上输入的,所以我不能详细说明。

我找到了一篇非常有用的文章的书签,这帮助我设置了 webfaction 运行:

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

希望对您有所帮助。如果您需要更多帮助,请告诉我您的实际设置。

祝你好运!