Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Hey, I'm having difficulty installing a password protected directory on a client's webserver.

    I have the following .htaccess file:

    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile ../.htpasswd
    AuthGroupFile /dev/null
    <Files /admin/>
    require valid-user
    </Files>
    And then a file called .htpasswd above this directory which simply contains the username and password in the format:

    username:[encryptedpassword]
    But nothing happens when I try to navigate to the /admin folder on the site, i.e. it just goes straight to the page - no password protection.

    What have I done wrong?
    tekp :cheeky: tekponline.com

  2.  

  3. #2
    Senior Member hagen's Avatar
    Join Date
    Aug 2005
    Posts
    408
    Member #
    10882
    Liked
    1 times
    As this is an Apache format, have you checked you are using an Apache server?



    -Hagen
    Hagen Rose: hagen(at)jxwd(dot)co(dot)uk
    JX Web Development, Bournemouth, Dorset...JXWD.co.uk

  4. #3
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Nope.. lol, how do I check that?
    tekp :cheeky: tekponline.com

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Does your host support PHP?

    Or, when you login to whatever Control Panel your host provides, it should say somewhere in there.

    Or, I do a WHOIS on tekponline.com and find out you have an Apache server!

  6. #5
    Senior Member hagen's Avatar
    Join Date
    Aug 2005
    Posts
    408
    Member #
    10882
    Liked
    1 times
    Hi tekp, the easiest most direct way is to look at your server environment variables...

    There are very many useful things stored including the type and version server used...

    PHP has a really useful built in function to display these...

    Make a file called say phpinfo.php and add the following content:

    <?php

    phpinfo();

    ?>

    Upload this file to the server and open it in the browser...

    this is a great tip for general information... but relies on your server having PHP!

    :-)
    -Hagen
    Hagen Rose: hagen(at)jxwd(dot)co(dot)uk
    JX Web Development, Bournemouth, Dorset...JXWD.co.uk

  7. #6
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    My host does support PHP, and I don't have a control panel on the site :/

    Cant do a WHOIS on the domain since it's not mine and it ends in .org.uk and that isn't on the dropdown menu on the website :/

    Could it be the AllowOverride thing is set to false in httpd.conf?
    tekp :cheeky: tekponline.com

  8. #7
    Senior Member hagen's Avatar
    Join Date
    Aug 2005
    Posts
    408
    Member #
    10882
    Liked
    1 times
    Hmmmm.... it's unlikely I have never seen this used by server companies on shared servers anyway...

    Actually from a security sense it does not make much sense having the password file unpretected / outside the protected area... because you could potentially just read it!...

    So I guess it's fairly possible it is not allowing it...!

    Have you tried moving it into the directory you want to protect? This is more normal...

    Hagen
    Hagen Rose: hagen(at)jxwd(dot)co(dot)uk
    JX Web Development, Bournemouth, Dorset...JXWD.co.uk

  9. #8
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Ahh it turned out the server admin wasn't allowing it he's changed it now though!

    Thanks anyways!
    tekp :cheeky: tekponline.com


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:20 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com