很抱歉,我是新来的服务器配置,我上个月一直试图让我的django项目在WWW上运行。
我已经没有解决403错误的想法了;
搜索堆栈溢出;
-
Apache2 mod_wsgi 403 forbidden error
-
Django + wsgi = Forbidden 403
-
Django with mod_wsgi returns 403 error
-
403 Forbidden error with Django and mod_wsgi
-
Django, mod_wsgi and apache2.4 = problems
-
Django + mod_wsgi + Apache = 403 Forbidden
但我得到的唯一答案就是写下这些代码;
<Directory C:\Frontier_Website\FrounterWebApp\FronterWeb>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
允许访问,但仍有错误403。
我尝试使用virtual env,但出现了配置问题并导致错误500
这是我的代码:
httpd Apache代码仅用于mod_wsgi区域
##setting of the Apache httpd config for mod_wsgi
LoadModule wsgi_module "C:\users\user\appdata\local\programs\python\python37\lib\site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"
WSGIScriptAlias / "C:\Frontier_Website\FrounterWebApp\FrounterWeb\wsgi.py"
WSGIPythonPath "C:\Frontier_Website\FrontierWebApp\zigview"
WSGIPythonHome "C:\Users\user\AppData\Local\Programs\Python\Python37"
<Directory C:\Frontier_Website\FrounterWebApp\zigview\static>
Require all granted
</Directory>
<Directory C:\Frontier_Website\FrounterWebApp\FronterWeb>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
wsgi.py代码;
#wsgi in my poject
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'FrounterWeb.settings')
application = get_wsgi_application()
如果你能帮助我真正的学徒它,因为我要求乘数时间在这个问题上的不同形式,并回答。