Forum Moderators: phranque

Message Too Old, No Replies

Control domain access

Auth

         

oakc123

6:40 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



Can anyone tell how I can control domain access? I have a URL wiki.mydomain.com and when some types that URL in I would like to have a U/P box appear?

I have only used this type of Auth in the past:

AuthType Basic
AuthName 'Username and Password Required'
AuthBasicProvider dbm
AuthDBMType SDBM
AuthDBMUserFile /var/www/auth_user_pass
AuthDBMGroupFile /var/www/auth_user_pass
<Limit GET POST>
require valid-user
</Limit>

Within the <Directory> tag. Can I do something like that using the same auth file in a Virtual Host?

oakc123

10:40 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



I guess a better question is "What is the best way to ask for a Username and Password when server a domain. For instance when you enter an address in your browser like wiki.mydomain.com you get a username/password box.

jdMorgan

5:25 pm on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not clear what the question is here.

Have you tried using your example auth code or something similar at the <VirtualHost> level? If so, what were the results and how did those results fail to met your expectations and/or needs?

Answering a question like "What is the best method?" is difficult. It's similar to "What is the best car?" or "What is the best computer?" -- impossible to answer without a very long list of goals and requirements.

Jim

Caterham

6:51 pm on Jan 14, 2009 (gmt 0)

10+ Year Member



Within the <Directory> tag. Can I do something like that using the same auth file in a Virtual Host?

Not directly. You can put your <Directory> section with the directives above into the <virtualhost> if they should apply to the specific <virtualhost> only. Auth and access directives are valid in per-directory context only.

oakc123

8:45 pm on Jan 15, 2009 (gmt 0)

10+ Year Member



The only issue is that this domain is actually being redirected to a jetty web server. What I am hoping to do is use and existing username/password file from apache and have apache verify the user at the point they hit URL wiki.mydomain.com.