LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2004, 11:38 AM   #16
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58

hi

good for u
but the script was a good learning experince
at least u have an option in case ur ISP did not help

regards
 
Old 11-10-2004, 06:43 AM   #17
mark001
LQ Newbie
 
Registered: Sep 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Hi, sutley

My website is hosted on apache web server for linux platfornm, I don't really know which version though.

The server supports cgi script for counter, form to mail etc. and my ISP accepts cgi scripts written by clients.

The php "include" way of doing it sounds cool.

Thanks.

regards.

mark001
 
Old 11-10-2004, 08:56 AM   #18
sutley
Member
 
Registered: Jul 2004
Posts: 42

Rep: Reputation: 15
Ah. So you are using Apache. Great! Then directory restriction is a piece of cake.

Put in a file named ".htpasswd" in the parent directory of htdocs.
Go here http://help.powweb.com/cgi-bin/crypt.cgi and fill in a user name and password.
Cut and paste the generated text into your .htpasswd file.

Inside any folder you want to protect, create a file name ".htaccess"
Put this text in the .htaccess file and edit to fit your situation:

AuthUserFile /PATH/TO/.htpasswd
AuthGroupFile /dev/null
AuthName "AUTHENTICATION WINDOW TITLE"
AuthType Basic
require user USERNAME_USED_IN_.HTPASSWD
 
Old 11-12-2004, 03:29 PM   #19
sutley
Member
 
Registered: Jul 2004
Posts: 42

Rep: Reputation: 15
just wanted to post this since we were talking about php logins earlier.
from http://www.htmlite.com/ - > http://www.htmlite.com/US001.php
a nice explanation of creating a login page using php

sam
 
  


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
Password protect a directory aquatux SUSE / openSUSE 6 08-02-2005 12:56 AM
Password protect a website J_K9 Programming 5 07-07-2005 09:12 AM
how do I poassword protect a directory on a website, Apache bentman78 Linux - Software 8 06-17-2004 12:12 PM
How to password protect a web directory abdulber Linux - Software 1 01-28-2004 12:34 AM
Password protect a directory Stephanie Linux - General 6 03-26-2002 03:58 PM


All times are GMT -5. The time now is 04:07 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