LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-12-2003, 08:56 PM   #1
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
.htaccess setup


I have been trying to setup apache for the use of .htaccess files, with no luck.

I have followd everything on the websites I could find and still nothing could someone tell me what all needs done to the httpd.conf file
the .htaccess, .htpasswd and where they actually go and what permisions should be on them including who should the owner of the files be.

my .httaccess file

AuthUserFile /var/www/html/DIRECTORY/.htpasswd
AuthGroupFile /dev/null
AuthName "Private Page"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

its permission are
owned by apache.apache
mod - 644



my .htpasswd file
owned by apache.apache
mod - 600


and the httpd.conf file

I made this change

AllowOverride none - to - AllowOverride AuthConfig
 
Old 12-12-2003, 09:18 PM   #2
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Original Poster
Rep: Reputation: 15
Ok, I have it actually asking for the login now, but I can not get it to read the .htpasswd file and allow access
 
Old 12-12-2003, 09:24 PM   #3
guardian653
Member
 
Registered: Oct 2003
Distribution: Gentoo
Posts: 79

Rep: Reputation: 15
using the basic auth with apache (using flat files) has been very unsuccessful for me, if I were you I would use mod_auth_mysql and setup a database with users and groups (easier and faster)

but if you can't for some reason use that...
try

htpasswd -c .htpasswd
htpasswd username password

also I wouldn't keep that file in your wwwroot, I would keep it outside (if you can) that directory

Dave
 
Old 12-12-2003, 09:50 PM   #4
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Original Poster
Rep: Reputation: 15
I did move it out of that directory path, the only reason I was going to use the .htaccess. was for the security popup window.
 
Old 12-12-2003, 10:45 PM   #5
guardian653
Member
 
Registered: Oct 2003
Distribution: Gentoo
Posts: 79

Rep: Reputation: 15
AuthUserFile /usr/local/www/data/test2/.htpasswd
AuthGroupFile /dev/null
AuthName "Test Site"
AuthType Basic
or
AuthType Digest

<Limit GET POST>
require valid-user
</Limit>

try that as your .htaccess (change the Userfile path of course)
then

htpasswd -cd .htaccess [username]
or
htpasswd -c .htaccess [username]
or (for md5 digest)
htpasswd -cm .htaccess [username]

also make sure that both your .htaccess file and .htpasswd file are given full ownership to your web server account (e.g. chown www:www .ht*)

After trying this for a while I was able to get it to work, though, I don't see what I did other than restarting it serveral times. I also enabled mod_auth_digest, but I'm not using it...

Any one else want to take this on?

Dave
 
Old 12-13-2003, 09:28 AM   #6
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Original Poster
Rep: Reputation: 15
Thank you for your help
basically, I had to go through the same thing to get it going,
and I still am not for sure what I did any differant than before.
besides the restarting for everychange i tried. I did activate the same auth mods like you but I am not using them either.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setup .htaccess sporkit Linux - Networking 2 04-17-2004 02:05 AM
htaccess spank Linux - Newbie 1 10-27-2003 01:49 PM
.htaccess artistik Linux - Software 1 10-23-2003 03:24 PM
.htaccess tailine Linux - Newbie 27 06-16-2003 07:27 AM
Htaccess DoobyWho Linux - General 4 04-28-2003 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration