LinuxQuestions.org
Help answer threads with 0 replies.
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 02-20-2003, 06:20 PM   #1
demicheru
LQ Newbie
 
Registered: Feb 2003
Location: LA area
Distribution: RH8
Posts: 5

Rep: Reputation: 0
apache password protection


I am taking a general linux class, using RH8. our current project is to password protect the default page in apache(i.e., http://localhost/) so that the browser asks for a password, and you cant get to the page without entering a/the correct one
i have already created a .htpasswd file although i am not sure i put it in the right folder.
i am having trouble finding out where the actual default page is, and from there creating a .htaccess file to let apache know about the .htpasswd file.
in the spirit of linux, the instructor has encouraged the use of forums/mans/howtos/ etc, so it isnt cheating for me to get info from anywhere.

basically, what i need is 1)where should the .htpasswd file go, 2)where does the .htaccess file go, 3) how do i find the default page, and 4) am i even on the right track?

complication-i dont have a whole lot of access to the comp i am trying to do this on..its in a classroom, not a lab, that is used often. however, i can just do it next class meeting if it is pretty straightforward.


any help will be appreciated.

thank you, philip
 
Old 02-21-2003, 11:18 AM   #2
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Rep: Reputation: 30
I hope you have a command line to the machine, if so the folder you are probably looking for is called htdocs at a command line look for that or httpd.conf which is the configuration file for apache you can look for the files by typing in

locate httpd.conf
or
locate htdocs

in the httpd.conf you will find a line called DocumentRoot that will tell you where the webpage files are stored in the filesystem

If you can ftp into the server just drop the .htaccess file into the root of the website. That should get you going for now. Have fun and keep playing with linux!
 
Old 02-25-2003, 05:13 PM   #3
demicheru
LQ Newbie
 
Registered: Feb 2003
Location: LA area
Distribution: RH8
Posts: 5

Original Poster
Rep: Reputation: 0
unfortunately, it is usually used as a windows machine when it is being used, and when its not being used, it is off...cant connect to it..tried a few times at different hours of the day/days of the week, but i cant connect.
class is meeting wed. 2/26/03, so i guess ill finish it then. thanks for the help cli_man

-demicheru
 
  


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
Per-user directories with password protection (apache) gwroy20 Linux - Software 1 04-27-2004 12:48 AM
Directory password protection scootz6 Linux - Security 2 03-25-2004 02:04 PM
password protection kushal Linux - Security 4 10-10-2002 09:33 PM
Password Protection TheSockMonster Linux - Newbie 1 05-27-2002 11:10 AM
IP & Password Protection karunesh Linux - Security 4 04-10-2002 02:57 PM


All times are GMT -5. The time now is 09:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration