How do I add .htaccess access restrictions to an OSQA site? I am using mod_wsgi with Apache.

asked 11 Jul '10, 17:52

Joseph's gravatar image

Joseph
1.6k387172
accept rate: 36%


usually you'll have to put it inside a location tag. Here's an example we use in some demo sites:

<Location "/">
            AuthUserFile /etc/apache2/.sfapasswds
            AuthName "XXX demo"
            AuthGroupFile /dev/null
            AuthType Basic
            Require valid-user
</Location>
link

answered 15 Jul '10, 11:45

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

You'll have to do the configurations in the virtual host file. You can use the same syntax as a plain .htaccess file.

link

answered 12 Jul '10, 14:05

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

I get the following error Syntax error on line 18 of /home/turian/webapps/.../osqa.conf: AuthType not allowed here

(12 Jul '10, 20:28) Joseph

And what's on line 18 of the osqa.conf file? And where did that osqa.conf file came from?

(12 Jul '10, 22:06) Hernani Cerq... ♦♦
1

Also, did you read the apache docs? You can try here http://httpd.apache.org/docs/2.0/howto/auth.html

(12 Jul '10, 22:07) Hernani Cerq... ♦♦

I checked out the apache docs, but it doesn't really tell me where I can and can't put AuthType.

Line 18 say: AuthType Basic

osqa.conf is included by httpd.conf, and includes my OSQA virtual host definitions.

(15 Jul '10, 11:39) Joseph
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

Tags:

×29
×8
×6
×4
×3

Asked: 11 Jul '10, 17:52

Seen: 976 times

Last updated: 01 May '11, 13:19

powered by OSQA