我已经找到一种方法来解决这个问题,这是一个有点哈克,但它的工作。 我从这里http://wiki.bitnami.org/Components/Django得到它。 但他们暗示,你只需要做到这一点,如果你使用的是Apache网络服务器这我不是。我正在使用django的开发服务器,但它仍然有效。
基本上我不得不创建在/ home/bitnami /应用/ Django的/ conf目录一个DoE.conf文件,该文件是这样的:
Alias /static "/opt/bitnami/apps/django/lib/python2.7/site-packages/django/contrib/admin/static"
<Directory '/opt/bitnami/apps/django/lib/python2.7/site-packages/django/contrib'>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias /DoE "/opt/bitnami/apps/django/scripts/DoE.wsgi"
<Directory '/opt/bitnami/apps/django/scripts'>
Order allow,deny
Allow from all
</Directory>
,然后创建一个名为DoE.wsgi文件/ home/bitnami /应用/ Django的/脚本,看起来像这样:
import os, sys
sys.path.append('/opt/bitnami/apps/django/django_projects')
sys.path.append('/opt/bitnami/apps/django/django_projects/DoE')
os.environ['DJANGO_SETTINGS_MODULE'] = 'DoE.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
后,我不得不包括
/opt/bitnami/apps/django/conf/DoE.conf
在我httpd.conf文件,这对于我的情况在这里中:/ opt/bitnami/apache2的/ conf目录
在此之后,我重新启动我的机器/服务器和一切都很好:)
酷!现在选择你的答案作为'答案':) – SaiyanGirl 2012-07-27 16:08:51
@Dana非常感谢你帮助与stackoverflow和bitnami :) – AmirHBP 2012-07-27 16:22:34
这很酷,但告诉我如何将一个域/子域直接链接到Django项目?现在的域名指向bitnami欢迎页面,我想直接在域提供的web应用程序我 – 2014-10-31 16:41:03