Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> I Can't Seem To Get The .htaccess To Work., I'm trying to protect the web root dir
ExCIA
post Apr 9 2005, 04:15 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 9-April 05
Member No.: 4,847



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.
Go to the top of the page
 
+Quote Post
DS2K3
post Apr 9 2005, 07:12 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



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


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
ExCIA
post Apr 9 2005, 11:48 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 9-April 05
Member No.: 4,847



I just simply use apt-get install apache and is there a way of checking which httpd.conf apache is using?
Go to the top of the page
 
+Quote Post
DS2K3
post Apr 9 2005, 12:19 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



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


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 03:44 PM