WebFaction
Community site: login faq
0
1

I want to have a simmple basic authentication in front of an django app until it's fully ready. Is there any easy way to do this? Adding a .htaccess to my django app just seemed to make it blow up.

asked 07 Aug '12, 01:12

docgnome
134
accept rate: 0%


You would add the rules which normally go into .htaccess to the httpd.conf file and than restart Apache. You will need to change the directives to suit a mod_wsgi environment.

from:
<Files .*>
</Files>
to:
<Location "/">
</Location>
permanent link

answered 07 Aug '12, 01:17

johns
5.4k312
accept rate: 23%

edited 07 Aug '12, 01:21

I did that but i get Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration

(07 Aug '12, 01:30) docgnome

is the auth module being loaded?

LoadModule auth_basic_module mod_auth_basic.so
(07 Aug '12, 01:42) johns

It is now. Same problem.

(07 Aug '12, 01:43) docgnome

Try this one,

LoadModule authn_file_module modules/mod_authn_file.so
(07 Aug '12, 01:59) johns

That allows it to start but i still get at 500 error. Will submit a ticket in the morning.

(07 Aug '12, 02:49) docgnome

This was answered here, sorry I missed it the first time.

(07 Aug '12, 19:29) johns

AH! Thanks! Got it solved.

(08 Aug '12, 01:10) docgnome
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×75

question asked: 07 Aug '12, 01:12

question was seen: 6,306 times

last updated: 08 Aug '12, 01:10

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM