Web Hosting Talk







View Full Version : htaccess/htpasswd problem


Lmax
09-26-2001, 03:32 PM
Hi,
i have a htaccess problem. I searched the forum for this error but i can't find it. When i put a htaccess file into a dir i get the famous error: "Cannot find server, The page cannot be displayed"
I've checked my access.conf
This is what it looks like:

<Directory /home/sites/>

# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".

# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.

Options Indexes FollowSymLinks Includes MultiViews

# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"

AllowOverride All

# ignore .ht*
<Files ".ht*">
deny from all
</Files>

So this shouldn't be the problem.

My htaccess file looks like:

order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/home/.htpasswd
<Limit GET>
require valid-user
</Limit>

And i created my password file with the "htpasswd -c /path/to/.htpasswd username" methode

Does someone has a suggestion how to solvee this and what can cause the problem.

Thanks

CmptrWz
09-26-2001, 03:41 PM
Looks like you need to re-order your commands. Too bad .htaccess won't give you the "Cannot find server" error.

mozd3v
09-26-2001, 11:15 PM
Should you not correct:

--
order allow,deny
allow from all
require valid-user
Authname **DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/home/.htpasswd
<Limit GET>
require valid-user
</Limit>
-----

**Specify the directory your actually using?

Chicken
09-27-2001, 01:06 AM
create the password file:
htpasswd -c /home/sites/home/secure/.htpasswd username

order allow,deny
allow from all
require valid-user
Authname secure
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/home/secure/.htpasswd

This should work, and isn't far off from what you had...

Lmax
09-27-2001, 05:31 AM
Still the "The page cannot be displayed" error.
Any other suggestions?? I'm really at a loss here.

Big-TB
09-27-2001, 05:00 PM
OK, I have seen this post for some time and I see you have not found your problem: cut and past this in to your .htaccess

AuthPAM_Enabled off
AuthType Basic
AuthName "FILE NAME."
AuthUserFile /home/sites/site1/web/directory/.htpasswd
require valid-user

Where /site1/ is put your site number also where /directory/ put the name of your directory you which to protect.

If you need to know how to do this in full using TELNET then email me.. I hope this helps you?

zbco
09-27-2001, 05:06 PM
Hi

Do you have mod_gzip installed?

I had the same problem as you did... no suggested modification to the .htaccess file worked.... UNTIL I disabled mod_gzip in the httpd.conf.

Now everything works perfectly.

Regards

Lmax
09-27-2001, 06:20 PM
Originally posted by zbco
Hi

Do you have mod_gzip installed?

I had the same problem as you did... no suggested modification to the .htaccess file worked.... UNTIL I disabled mod_gzip in the httpd.conf.

Now everything works perfectly.

Regards

Yes, i have mod_gzip installed. Seems like i have to make a choose, using htaccess or mod_gzip. Or does someone know a solution??

And thanks Big-TB but seeting up htacces doesn't seem to be the problem. I tried several configurations in my htaccess file, but none works. When i put a .htaccess file into the directory, the server acts like that directory doesn't exist. Not even a popup window asking for a username or pass.

Thanks

Lmax
09-27-2001, 06:49 PM
i think i should use something like this in the httpd.conf
mod_gzip_item_exclude file

I tried these three(separately) and restarted the server.
mod_gzip_item_exclude file .htaccess
mod_gzip_item_exclude file \.htaccess
mod_gzip_item_exclude file \.ht$

They didn't work. Maybe something in the syntax??

Please advice

Big-TB
09-27-2001, 07:00 PM
Lmax, I can ask our Tech lads later about this.
Have you got A URL with this error so they can look at it?

Lmax
09-27-2001, 07:07 PM
on this URL htacces should work.
http://www.lanthost.com/phpadmin/

I'll PM you my httpd.conf, my access.conf and the .htaccess file. if you need more, let me know

Lmax
10-01-2001, 01:06 PM
I still don't have it working. I've tried every possible combination in my htaccess file.
My access.conf looks exactly like Chicken posted in http://www.webhostingtalk.com/showthread.php?&postid=89301#post89301

I commented mod_gzip completely out of my httpd.conf and restarted. still it doesn't work. I compiules it manually(didn't use the prefab mod_gzip) nut this also didn't work.

My htaccess now looks like
AuthUserFile /home/sites/home/.htpasswd
AuthGroupFile /dev/null
AuthName "Protected"
AuthType Basic
AuthPAM_enabled off
require valid-user

But still i get the "The page cannot be displayed" with "Cannot find server" in the tile bar(??) error.

Can someone please help. I need htaccess desperately.

Thanks

Big-TB
10-01-2001, 01:32 PM
Lmax, We are still looking in to this, but we can not see what your doing wrong we use the format in which I posted on this forum.

I am still looking

Big-TB
10-02-2001, 09:23 AM
Hi, Have you got it working now?
Did you get our email regarding your problem?

Chat soon
See ya

Lmax
10-02-2001, 12:11 PM
Ysterday my server completely crashed :mad:

After a complete reinstall thinks were working fine again. Thanks for the help though.

Big-TB
10-02-2001, 01:38 PM
I hope everything is alright with your server (not to much down time)

Was the email we sent of help to you?? and do you want the cgi script??

anyway all the best

Lmax
10-02-2001, 01:52 PM
Yes, your mail was helping me. And what kind of cgi script do you mean?? Don't really understand

Big-TB
10-02-2001, 05:31 PM
The script allows you 2 add users to your .htpasswd as well as remove them, all this is done through your web browser easy set-up '123'.

Do you want it?

If you do send me the path inwhich you have set-up in your .htaccess
AuthUserFile /home/sites/site1/web/directory/.htpasswd

Lmax
10-03-2001, 07:36 PM
The problem is back again
I had apache 1.3.6 and htaccess was working fine. Then i installed apache 1.3.20 according to the instructions on this page http://www.sakuralover.com/raq3/upgrade_raq3.htm
and now htaccess isn't woprking anymore again.
Last time it was also on apache 1.3.20
I haven't installed mod_gzip or something.
AllowOverride is set to All in access.conf

I really don't know where to look else
the htaccess files haven't changed

JeffM
10-04-2001, 12:19 AM
I've been doing some research on RAQi servers and using .htaccess (trying to decide if I want to go with RackSpace for a new site I'm developing)

I found several posts regarding a problem that sounds similar to yours on the alt.www.webmaster newsgroup. They're mentioning something about improper Apache config.

Not sure about the rules of this board so I won't post the URL. Go to deja.com (now Google groups) and do a search on "htaccess raq" without the quotes. Look for a thread on the alt.www.webmaster NG.

Hope it helps.

Jeff

Chicken
10-04-2001, 07:44 AM
Posting URLs of resources is fine (helpful even), it is only the posting of your own URLs that is not permitted.

good = direct link to helpful resources
bad = link to .htaccess tutorial http://yourhostname.com/htaccess_tutorial

CmptrWz
10-04-2001, 03:22 PM
So Chicken, if I were to ever post a 50 page .htaccess guide me and some friends made on my web site, I could not post a link to it but someone else could?

Chicken
10-05-2001, 01:05 AM
Short answer:
Yes.

Long answer:
Basically, the aim is to keep self-promotion off the forums, and limited to signature/profile/ad forums, etc., not to limit the exchange of information. For example, many host have some really good info on their sites regarding many aspects of web hosting and or web design, etc. What we don't want is people posting links off of their domain to these pages, or places posting links to informational sites which have paid advertising on them (in other words, in no way can the main URL or the pages make you money).

I'd prefer not to list exceptions to this, rather I'll say that if you have a URL of your own that you'd like to post, please contact us and get approval from a moderator first. We'll review it ASAP and give you an answer (typically within a couple of hours at most).

Of course, you are always welcome to copy & paste the info that pertains to the question, from your site and post it.

If you have any other questions, feel free to contact any of the moderators via PM/email.