我不是Django的专家。我能够在本地机器上运行应用程序。我想在我们的内部服务器上部署这个应用程序。 我正在使用的版本:Python:2.7、Django 1.11、Apache:2.4 开放端口:9991
当我从任何机器访问端口时,它都不会给我错误。例如。xxx.xx.xxx.xxx:9991显示阿帕奇页面。你知道吗
但是当我把网址添加到应用程序时 xxx.xx.xxx.xxx:9991/WebApp1Url 它会产生错误。 下面是我的配置httpd.conf文件你知道吗
Listen 9991
<VirtualHost *:9991>
Alias /static "C:/xxx/DjangoSite/WebApps/WebApp1/static"
<Directory "C:/xxx/DjangoSite/WebApps/WebApp1/static">
Require all granted
</Directory>
<Directory "C:/xxx/DjangoSite/WebApps/WebApps">
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
下面是我的wsgi.py公司地址:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "WebApps.settings")
application = get_wsgi_application()
from WebApp1.wsgi import WebApp1
application = WebApp1(application)
你知道吗设置.py包含:
WSGI_APPLICATION = 'WebApps.wsgi.application'
我可以肯定的是wsgi.py公司是正确的。我不知道什么是不对的。有没有人能指出哪一步遗漏了?感谢您的帮助。请原谅上面的任何拼写错误。先谢谢你。你知道吗
任何问题的第一站,无论是新用户还是有经验的用户,都应该是Django非常详细、广泛、最新、版本化的文档。甚至还有deploying a Django project with Apache HTTPD的部分。你知道吗
下面引述了一些内容,但概括地说:
相关问题 更多 >
编程相关推荐