Django on apache wtih mod_wsgi (Linux) - 403 Forbidden

后端 未结 3 1240
轻奢々
轻奢々 2021-01-19 04:37

Alright, so i am following this tutorial. When i try to access my site through my local server i get this peculiar error:

Forbidden You don\'t have per

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-19 05:01

    If this is exactly your config file then i doubt the path that you're using is wrong. Please fix that first.

    Set WSGIScriptAlias this to correct path.

    Then your WSGI file must look something like:

    import os
    import sys
    
    os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
    
    import django.core.handlers.wsgi
    application = django.core.handlers.wsgi.WSGIHandler()
    

提交回复
热议问题