我已经正确安装了所有内容并通过了与该主题相关的所有解决方案,但仍然存在错误,我是Django的新手,非常感谢您的帮助
我在错误日志文件中收到此错误:
[周五2月14日21:52:16.916422] [authz_core:错误] [pid 4288:tid 1252] [客户端:: 1:51391] AH01630:服务器配置拒绝了客户端:E:/ AppSource / eCommerce / src /ecommerce/wsgi_windows.py
当我尝试达到127.0.0.1:80时,我得到:禁止403
这是我的wsgi_windows.py配置:
activate_this = 'CE:/AppSource/eCommerce/Scripts/activate_this.py'
exec(open(activate_this).read(),dict(__file__=activate_this))
import os
import sys
import site
from django.core.wsgi import get_wsgi_application
site.addsitedir("C:/Python37/Lib/site-packages")
sys.path.append('E:/AppSource/eCommerce')
sys.path.append('E:/AppSource/eCommerce/src')
sys.path.append('E:/AppSource/eCommerce/src/ecommerce')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ecommerce.settings'
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ecommerce.settings")
application = get_wsgi_application()
这是hhtpd-vhosts.conf配置:
<VirtualHost *:80>
ServerName localhost
WSGIPassAuthorization On
ErrorLog "E:/appSource/eCommerce/eCommerce.error.log"
CustomLog "E:/appSource/eCommerce/eCommerce.access.log" combined
WSGIScriptAlias / "E:/appSource/eCommerce/src/ecommerce/wsgi_windows.py"
<Directory "E:/appSource/eCommerc/src/ecommerce/">
<Files wsgi_windows.py>
Require all granted
</Files>
</Directory>
Alias /static "E:/appSource/eCommerce/static_cdn/static_root"
<Directory "E:/appSource/eCommerce/static_cdn/static_root">
Require all granted
</Directory>
Alias /media "E:/appSource/eCommerce/static_cdn/media_root"
<Directory "E:/appSource/eCommerce/static_cdn/media_root">
Require all granted
</Directory>
</VirtualHost>
我尽了我所知道的一切 请帮忙解决这个问题 谢谢
答案 0 :(得分:0)
我认为实现目标的最简单方法是更改apache的端口号,然后重新启动apache。