Solved

.htpasswd and Alias Directory

Posted on 2004-10-05
7
1,271 Views
Last Modified: 2008-03-06
I have to restrict the access of a directory using the .htaccess and .htpasswd files.
When I use it for a directory that is in the directory root all is fine, when I try to use it for a dierctory out of the root it dosen't work.

In the httpd.conf I use Alias /www/ "/databases/www/"

if I create a pippo.htm file I can see it.
Now I create the .htaccess file like the other way:

AuthName "Alpha_Web"
AuthType Basic
AuthUserFile /databases/www/.htpasswd
require valid-user

and the .htpasswd file:
pippo:68DnE1HvzmjoI

but no auth is required. I move this 2 file in another folders that is in the directory root chaning only the .htaccess pointer all works fine.

So how can I use the Apache .htpasswd restriction password system with a directory out of the directory root???

Thanks and sorry for my english
Daniele
0
Comment
Question by:giropizza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Author Comment

by:giropizza
ID: 12225250
I found it:
I have to use the httpd.conf:

    Alias /www/ "/databases/www/"

    <Directory "/databases/www/">
     Options Indexes
     AuthType Basic
     AuthName "Alpha_Web"
     AuthUserFile "/databases/www/.htpasswd"
     Require valid-user
     </Directory>

Bye bye
Daniele
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12226136
Daniele -

FWIW, you probably didn't have Options AllowOverride for this directory prior to putting the auth information into the httpd.conf - that meant that you couldn't override the httpd.conf using an .htaccess file.
0
 

Author Comment

by:giropizza
ID: 12226193
no, now all is ok, both on the "internal" directory and the "external".

Daniele
0
Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

 
LVL 15

Expert Comment

by:samri
ID: 12239847
PAQ/refund ?
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12240438
Yes - it should be.  Daniele, as this isn't an abandoned question, you should post a question in Community Support:

http://www.experts-exchange.com/Community_Support/

requesting that the question is closed as PAQ/refund with a link to this question.

0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12278651
Question answered by asker or dialog valuable.
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question