django - protect some web paths with basic authentication

前端 未结 1 1316
清酒与你
清酒与你 2021-02-04 13:48

i\'m fairly new to django and just trying a couple simple experiments to get my feet wet. i\'m running django 1.0, apache2 prefork and mod_wsgi. I\'m trying to build a site wit

1条回答
  •  梦毁少年i
    2021-02-04 14:23

    Change:

    
    AuthType Basic
    AuthName "Authentication Required"
    AuthUserFile "/django/_HTPASSWD/.htpasswd"
    Require valid-user
    
    

    to:

    
    AuthType Basic
    AuthName "Authentication Required"
    AuthUserFile "/django/_HTPASSWD/.htpasswd"
    Require valid-user
    
    

    I don't believe you should need:

    WSGIScriptAlias /members /django/rc/apache_httpauth/django.wsgi
    

    0 讨论(0)
提交回复
热议问题