.htaccess problems

General discussions and other topics.
7 posts Page 1 of 1
by arcturusuav » Mon Jul 16, 2012 10:02 am
Hello -

I know this is a well-worn topic, but I'm having a problem getting my .htaccess to work properly. I've poured over countless postings and tried everything, but am obviously missing something.

I've added a sub-folder to my directory called 'pubs' and placed an .htaccess text file along with an .htpasswd text file into the 'pubs' folder. The .htaccess file is:


AuthUserFile /home/WWW_pages/arcturusuav/pubs/.htpasswd
AuthGroupFile /dev/null
AuthName "Secure Area"
AuthType Basic
<limit GET>
require valid-user
</limit>

I added an extra line to both files to avoid malformed header errors, used the sonic password tool to encrypt the password and added a 644 permission to the .htaccess file. When I go to the folder online, I get this message:

"The user name or password you entered for this area on http://www.arcturus-uav.com:80 was incorrect. Make sure you’re entering them correctly, and then try again."

Any help to troubleshoot this would be greatly appreciated. I realize I'm probably making a bonehead mistake, but right now I'm missing it.

Many thanks,

Dennis
by thulsa_doom » Mon Jul 16, 2012 10:39 am
Are you quite sure you have a "pubs" directory under /home/WWW_pages/arcturusuav/ ? Or is it in /home/WWW_pages/arcturusuav/arcturusuav.com/ ?
John Fitzgerald
Sonic Technical Support
by arcturusuav » Mon Jul 16, 2012 10:46 am
Hi John,

I tried both. When it was under /home/WWW_pages/arcturusuav/arcturusuav.com/pubs/.htpasswd, I didn't even get a form to enter un and pw.

It's now under /home/WWW_pages/arcturusuav/pubs/.htpasswd I get a form, but the form gives me the previously mentioned error message.

Thanks.

Dennis
by thulsa_doom » Mon Jul 16, 2012 11:05 am
Ok, I just took a peek under the hood.

First, /home/WWW_pages/arcturusuav/arcturusuav.com/pubs/.htpasswd is the correct path for where your .htpasswd file really is.

Second, you don't have an index file or autoindexing enabled.

I took the liberty of correcting the path and adding autoindexing to your .htaccess file, and I'm now prompted for a username and password (but I don't know the credentials, so that's as far as I can test right now).

We do not officially recommend the use of autoindexing (it's intentionally turned off by default), so you may want to remove the "Options +Indexes" line once you have content in there.
John Fitzgerald
Sonic Technical Support
by arcturusuav » Mon Jul 16, 2012 11:22 am
John -

Thank you. I'm still getting the same error message. Just t o confirm, the correct path should be:

AuthUserFile /home/WWW_pages/arcturusuav/arcturus-uav.com/pubs/.htpasswd
AuthGroupFile /dev/null
AuthName "Secure Area"
AuthType Basic
<limit GET>
require valid-user
</limit>

Options +Indexes

When I use this, I get a prompt, but cannot get access. Did I accidently turn autoindexing off? I don't even know where that is accessed.

Dennis
by thulsa_doom » Mon Jul 16, 2012 12:33 pm
Sorry, I missed the hyphen. The line that reads "Options +Indexes" is how autoindexing is turned on, but it looks like you have an index file now, so I would expect that end of things to be working.

Of course, I also see that your .htpasswd file has no read permissions at all right now (including for your own account), so nobody should be able to authenticate.
John Fitzgerald
Sonic Technical Support
by Guest » Mon Jul 16, 2012 12:52 pm
A million thanks John. I see the index file now.

I so appreciate your help!

Dennis
7 posts Page 1 of 1

Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 32 guests