LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-24-2002, 12:56 AM   #1
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Rep: Reputation: 15
Apache helps needed !!!


Hi...thanks for viewing.

Let say i have a restricted webpages.
It will do a username and password pop up when access to these
webpages.

How do i do tat in Apache ...where the username and passwd is tied down to the server login..like when accessed on the PC in LAN ??

Pls advise...
 
Old 01-24-2002, 02:10 AM   #2
amp2000
Member
 
Registered: Oct 2001
Location: Dublin, Ireland
Distribution: Mandrake 9.0 mostly!
Posts: 303

Rep: Reputation: 30
To be prompted for a user name & password in ie certain directory's on your web server use .htaccess
It's easy enough to do, check out this http://faq.clever.net/htaccess.htm

amp2000
 
Old 01-24-2002, 08:19 PM   #3
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
I did according to wat the website told me to.

When i tried to access the webpage, it never prompt
for any username or password.

Pls advise.
 
Old 01-24-2002, 09:13 PM   #4
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
is there anything i must edit in the Apache ( httpd.conf )
file ??
 
Old 01-25-2002, 05:38 AM   #5
amp2000
Member
 
Registered: Oct 2001
Location: Dublin, Ireland
Distribution: Mandrake 9.0 mostly!
Posts: 303

Rep: Reputation: 30
In your .htaccess file make sure you have the correct path to your .htpasswd file.
If the path is correct & it still wont work try editing your .htaccess file like below

<Limit GET POST>
order Deny,Allow
allow from All
require valid-user
</Limit>

instead of

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


Also what tripped me up setting it up was the . before the file names.
You need to have the dot before both filenames or it wont work.
Double check there is a dot in the path to your .htpasswd file aswell in the .htaccess file

As for editing httpd.conf I dont think so, as far as I can remember anyway.

amp2000

Last edited by amp2000; 01-25-2002 at 05:40 AM.
 
Old 01-25-2002, 07:55 AM   #6
kodiakmook
Member
 
Registered: Nov 2001
Location: Ohio
Distribution: Redhat 7.3, Mandrake 8.1
Posts: 43

Rep: Reputation: 15
check out this tutorial...

http://www.linuxplanet.com/linuxplan...orials/1527/1/
 
Old 01-25-2002, 10:03 AM   #7
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
link to server login

is there any way i can link this webpage password protected to the normal server login like the normal LAN login ??

instead of creating new username and password again ...
just for the webpage access...

pls advise..
 
Old 01-27-2002, 08:47 PM   #8
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
any solution ?
 
Old 01-27-2002, 11:04 PM   #9
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
http://httpd.apache.org/docs/howto/auth.html is the official document on apache authentication.

You have a number of choices of user databases for authenticating users. You can authenticate users using, mysql, ldap, local users...

The problem is finding an exhaustive list of these modules. http://theoryx5.uwinnipeg.ca/guide/s...h_modules.html
has a short list, but not the homepages for these modules. I would guess you need to find what authentication you'd like to use first. then find the module from the auth module list or on google, then install that module.

*WARNING!!* Do *not* use an apache module to authenticate users using they system passwords over a normal HTTP connection. That *might* be ok if you're using mod_ssl and HTTPS to encrypt the login.

As a scenario, we use auth_ldap http://www.rudedog.org/auth_ldap/ and mod_ssl http://www.modssl.org/ to authenticate users login to private sites and also use these same LDAP servers with PAM ldap and nss_ldap to authenticate system users. We also take further precaution by restricting by IP address using the httpd.conf settings. The apache module allows access to restrict users by groups and other arbitrary ldap attributes.
 
Old 01-28-2002, 02:19 AM   #10
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
Hi. I am using Apache 1.3.12 with mod_perl 1.21-10.

How do i use the Perl/Apache module AuthenPasswd ?
How do i know AuthenPasswd module is in the mod_perl ??

pls advise..
 
Old 01-28-2002, 03:06 AM   #11
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
check out http://perl.apache.org/ , try the suggestion in the FAQ that suggest using the Apache::Status module. It will tell you what's running.

If you do not have it installed you can get it from CPAN archives. See the download section of http://perl.apache.org/
 
Old 01-28-2002, 09:46 PM   #12
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
Wonder u have any experience in the Apache module *AuthenPasswd ?

I installed and compiled the module and also followed the example given...still it doesn't work ...

It prompted for username and password. I typed in the correct
username and password. Still it didn't work. Any advise...!!!


I wanted password prompting when access to my webpage...
which will authencate against the passwords in /etc/passwd
Unix login.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache question needed help runeleader Linux - Newbie 1 11-19-2004 01:17 AM
apache help needed! v well explained drigz Linux - Networking 4 05-18-2004 02:43 PM
apache help needed legal2k Linux - Newbie 8 02-08-2004 05:25 AM
Apache and Frontpage, no apache mods needed cli_man Linux - General 0 09-27-2003 09:31 AM
Apache helps needed !!! chuck77 Linux - General 1 05-15-2002 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:34 PM.

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
Open Source Consulting | Domain Registration