Help - Search - Members - Calendar
Full Version: I Can't Seem To Get The .htaccess To Work.
Linuxhelp > Support > Technical Support
ExCIA
I'm running:

Debian 'Sarge' with kernel 2.4

Programs installed:

Apache 1.3.33, PHP 4.3, MySQL 4, PHPMyAdmin, PEAR and Horde 3.

I seem to have trouble getting .htaccess to work.

I'm trying to protect the web root directory, which is /var/www

I edited the httpd.conf file with the vi editor in /etc/apache/httpd.conf <------ is that the right one?

I added this:

QUOTE
<Directory "/var/www">
AllowOverride AuthConfig
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>


I noticed when I check the httpd.conf file using cat /etc/apache/httpd.conf I get a different settings all together. How is that possible? If I edit it it kept saying that there is a httpd.conf.swp already.

I created the .htaccess file in /var/www and I chmod it with 644

QUOTE
AuthName "Administrators Only"
AuthUserFile /var/.htpasswd
AuthType Basic
require valid-user



I created the .htpasswd file in /var using the htpasswd program that generates secret password.

I restarted the apache server and no result.
DS2K3
Which suggests that the server is reading a different config file.

How did you install the software? I know that apache2 defaults to /usr/local/apache2/conf/httpd.conf for config when compiled fro source - But im not sure about Apache1

D
ExCIA
I just simply use apt-get install apache and is there a way of checking which httpd.conf apache is using?
DS2K3
CODE
find / -type f -name httpd.conf


You mmight want to run "whereis httpd" first though, and then look around in the various subdirectories there, since find'ing things can be quite slow if you have a lot of fles

D
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.