运行 Django 项目的 Apache 服务器仅显示“/ 的索引”和项目文件的名称,而不是运行网站

运行 Django 项目的 Apache 服务器仅显示“/ 的索引”和项目文件的名称,而不是运行网站

当我导航到该网站时,它只显示“/ 的索引”,然后显示我插入到 htdocs 中的文件。我查看了许多人遇到的相同错误,但尚未找到解决方案。我正在使用 Django、Apache 和 mod-wsgi 文件。

这是我的 httpd-vhosts.conf 文件的代码。显然,其中仍有一些虚拟数据,但那应该不重要吧?这是我第一次启动服务器,这让我大吃一惊。

我认为错误出在这个文件的某个地方,因为到目前为止一切都正常。

任何帮助都非常感谢!(请告诉我是否可以更轻松地查看其他文件的设置方式)

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
    ServerName dummy-host2.example.com
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

WSGIPythonPath C:/Apache24/htdocs/chf
<VirtualHost *:80>
ServerName chfestival.example
ServerAdmin [email protected]
DocumentRoot C:/Apache24

Alias /static/ C:/Apache24/htdocs/chf/static/

<Directory C:/Apache24/htdocs/chf/static>
Order deny,allow
Require all granted
</Directory>

WSGIScriptAlias / C:/Apache24/htdocs/chf/CHF/wsgi.py WSGIApplicationGroup %{GLOBAL}

<Directory C:/Apache24/htdocs/chf>
<Files wsgi.py> Order deny,allow
Require all granted
</Files>
</Directory>

</VirtualHost>

相关内容