Python Bitnami Django堆栈服务器无法识别新项目
我遵循这些步骤 我成功地创建了一个新项目。但当我转到localhost/sevenep/product_应用程序时,它会抛出以下错误:Python Bitnami Django堆栈服务器无法识别新项目,python,django,apache,bitnami,Python,Django,Apache,Bitnami,我遵循这些步骤 我成功地创建了一个新项目。但当我转到localhost/sevenep/product_应用程序时,它会抛出以下错误: Not Found The requested URL /SevenERP was not found on this server. 有什么问题吗?。这是我的文件夹结构: 以下是我的.conf文件: httpd-app.conf <Directory "C:/Users/JuanPablo/Bitnami Django Stack project
Not Found
The requested URL /SevenERP was not found on this server.
有什么问题吗?。这是我的文件夹结构:
以下是我的.conf文件:
httpd-app.conf
<Directory "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/SevenERP">
Options +MultiViews
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
WSGIApplicationGroup %{GLOBAL}
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
Alias /static "C:\Bitnami\djangostack-1.8.7-0/apps/django/lib/python2.7/site-packages/django/contrib/admin/static"
WSGIScriptAlias /SevenERP 'C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/SevenERP/wsgi.py'
httpd-vhosts.conf
<VirtualHost *:80>
ServerName djangostack.example.com
ServerAlias www.djangostack.example.com
DocumentRoot "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/SevenERP"
Include "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/conf/httpd-app.conf"
</VirtualHost>
<VirtualHost *:443>
ServerName djangostack.example.com
ServerAlias www.djangostack.example.com
DocumentRoot "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/SevenERP"
SSLEngine on
SSLCertificateFile "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/conf/certs/server.crt"
SSLCertificateKeyFile "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/conf/certs/server.key"
Include "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP/conf/httpd-app.conf"
</VirtualHost>
ServerName djangostack.example.com
ServerAlias www.djangostack.example.com
DocumentRoot“C:/Users/JuanPablo/Bitnami Django Stack projects/sevenerps/sevenerps”
包括“C:/Users/JuanPablo/Bitnami-Django堆栈项目/sevenep/conf/httpd-app.conf”
ServerName djangostack.example.com
ServerAlias www.djangostack.example.com
DocumentRoot“C:/Users/JuanPablo/Bitnami Django Stack projects/sevenerps/sevenerps”
斯伦金安
SSLCertificateFile“C:/Users/JuanPablo/Bitnami Django Stack projects/sevenep/conf/certs/server.crt”
SSLCertificateKeyFile“C:/Users/JuanPablo/Bitnami Django Stack projects/sevenep/conf/certs/server.key”
包括“C:/Users/JuanPablo/Bitnami-Django堆栈项目/sevenep/conf/httpd-app.conf”
因为从bitnami安装程序安装的默认项目工作正常:
请帮助。根据您共享的Bitnami Django链接 在
settings.py
中,没有将应用程序名称包含在已安装的应用程序中的步骤
您必须注册应用程序名称,否则将不使用您配置为控制器的URL
我希望这对你有好处
这里是Bitnami开发者 这个问题与python路径有关。 对于UNIX,您应该在
httpd app.conf
文件:
WSGIDaemonProcess wsgi-djangostack进程=2个线程=15显示名称=%{GROUP}python路径=/path到项目/
然后,重新启动Apache
在您的情况下(Windows),您应该添加这一行添加您的末尾installdir\apache2\conf\httpd.conf
:
WSGIPythonPath“C:/Users/JuanPablo/Bitnami Django Stack projects/sevenep”
还有瑞斯塔·阿帕奇
我希望这会有所帮助您必须修改apache服务器中的2文件
/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf
你会看到这样的事情:
# Bitnami applications installed in a prefix URL
Include "/opt/bitnami/apps/django/django_projects/Project/conf/httpd-prefix.conf"
# Bitnami applications installed in a prefix URL
Include "/opt/bitnami/apps/django/django_projects/Host/conf/httpd-prefix.conf"
在这里,您必须包括在项目中创建的httpd-prefix.conf的路径
Include "/opt/bitnami/apps/django/django_projects/YourProject/conf/httpd-prefix.conf"
将项目名称更改为项目名称,您必须删除指向项目的“包含”,否则您必须配置:
/opt/bitnami/apps/django/django_projects/Project/conf/bitnami-apps-vhosts.conf
对于多个站点
最终文件如下所示:
# Bitnami applications installed in a prefix URL
Include "/opt/bitnami/apps/django/django_projects/Project/conf/httpd-prefix.conf"
# Bitnami applications installed in a prefix URL
Include "/opt/bitnami/apps/django/django_projects/Host/conf/httpd-prefix.conf"
在文件中:
/opt/bitnami/apps/django/django_projects/YourProject/conf/httpd-app.conf
添加以下内容:
Alias /static "/opt/bitnami/apps/django/lib/python2.7/site-packages/Django-1.8.7-py2.7.egg/django/contrib/admin/static"
WSGIScriptAlias / '/opt/bitnami/apps/django/django_projects/YourProject/YourProject/wsgi.py'
然后
如果以root用户身份安装BitNami Django stack,或者使用虚拟机或云映像,请使用sudo安装需求并启动服务器:
$ cd mysite
$ sudo pip install -r requirements.txt
*/在settings.py*中配置数据库
这里有更多信息:
我已将该应用程序添加到已安装的应用程序中,但它不起作用。我已将该行添加到httpd.conf文件的末尾,但它不起作用。请帮帮我好吗。