Django with mod_wsgi returns 403 error

前端 未结 3 1955
攒了一身酷
攒了一身酷 2021-01-21 06:04

I am trying to use Django with Apache (and mod_wsgi). With the default Django webserver everything was going well, but now I get 403 (access forbidden) error when trying to load

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-21 06:58

    There is one other gotcha:

    Check your httpd.conf file for the following configuration:

    
          AddHandler cgi-script .cgi .pl .py
    
    

    This will cause the error.

    .py MUST NOT be configured as a CGI script

提交回复
热议问题