我试图使用django站点here中的教程,用现有的django项目来设置apache。我的操作系统是Ubuntu,一切都安装好了(django apache2 libapache2 mod wsgi)
我的配置文件
WSGIPythonPath /home/avlahop/development/django/rhombus2/rhombus/
<VirtualHost *:80>
ServerName myrhobmus.com
ServerAlias www.myrhombus.com
WSGIScriptAlias / /home/avlahop/development/django/rhombus2/rhombus/rhombus/wsgi.py
</VirtualHost>
创建conf文件后,我运行a2ensite Ubuntu命令来启用该站点。在
将WSGIPythonPath放在VirtualHost中会导致apacheconfigtest失败 directory中的Files inside指令(如示例中所述)给了我同样的失败
如果我去www.myrhombus.com网站我收到一条谷歌chrome找不到指定地址的消息。在
我做错什么了?互联网上的每个教程都使用旧的文件.wsgi虽然现在Django为您创建了这个文件,但是它是一个扩展名为.py的python文件。我如何为apache提供django服务?如果我想在我自己的服务器上生产,你会把django代码放在哪里,模板文件放在哪里?在
编辑:我只得到/页的索引。在权限方面,我和mysites的位置有什么关系吗?你能给我一个django站点apacheconf文件的工作示例吗?在
我使用django1.8并成功地部署了我的项目Apache服务器。我像您一样遵循了基本概念,并很早就启用了Apache这个模块。在
enable module
你可以我的项目结构这个问题。Refer this question to understand project structure
这是我的虚拟主机文件
在-wsgi.py-在
^{pr2}$我想这对你有帮助。在
相关问题 更多 >
编程相关推荐