2009/2/3 michaelg <[email protected]>:
>
> I'm using mod_wsgi to serve a couple django sites on a WHM/cpanel
> server.  I'd like to use basic auth to password protect the
> development server, but I'm having difficulty applying the
> instructions from this guide (http://code.google.com/p/modwsgi/wiki/
> AccessControlMechanisms).  I'm guessing I need to enter the info in my
> vhost include file, which looks like this:
>
> #/usr/local/apache/conf/userdata/std/2/account/dev.site.com/vhost.conf
>
> <IfModule mod_alias.c>
> Alias /robots.txt /home/account/public_html/dev/site/media/robots.txt
> Alias /media /home/account/public_html/dev/site/media
> Alias /admin_media /home/account/public_html/dev/site/media/
> admin_media
> </IfModule>
>
> <IfModule mod_wsgi.c>
> WSGIScriptAlias / /home/account/public_html/test.wsgi
> WSGIDaemonProcess nobody processes=2 threads=5 display-name=%{GROUP}
> WSGIProcessGroup nobody
> WSGIApplicationGroup %{GLOBAL}
> </IfModule>
>
> Please show me how to setup basic auth for this development site.

Which of the following are you wanting to do:

1. Have Apache handle HTTP Basic authentication, with reference to a
user database managed by Apache, such as htpasswd file? If this, see
Apache documentation:

  http://httpd.apache.org/docs/2.2/howto/auth.html

See Apache 2.0 documentation of using older Apache as there are some
differences in some cases.

2. Have Apache handle HTTP Basic authentication, with Python code
provided through mod_wsgi hooks to allow user database checks to be
handled by your own custom code? If this, then covered by mod_wsgi
documentation you have already been looking at:

  http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms

3. Allow a WSGI application to handle the HTTP Basic authentication?
If this, then you just need to enable passing of authentication
headers to WSGI application using WSGIPassAuthentication directive.
See:

  
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization

So, please clarify which you actually want, then I'll go and ask
questions about what you expect to see and what you are getting.

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to