LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 06-14-2004, 11:49 AM   #1
sujte
Member
 
Registered: Jul 2003
Posts: 48

Rep: Reputation: 15
Secure a web page


I used PHP to create a simple login process so users can see some report directory pages. Even though the users log into the website, it is possible to see the directory pages directly by simply typing in the URL in the address of the browser. How can I secure my directory pages so they can be access only by someone logged into the site?
 
Old 06-14-2004, 01:09 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You could do this with basic authentication:
http://httpd.apache.org/docs-2.0/howto/auth.html
 
Old 06-15-2004, 04:25 AM   #3
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
And if you mean that people can see a list of the files in the directory, then you should copy, or link, or just rename your login php page to index.php. When one types the url with just a directory, and no specific file, Apache will default to index.html, or index.php; or if neither of those exists, it will show the list of files in the directory.

Enjoy!
--- Cerbere

[edit] You may have to edit httpd.conf to include 'index.php'. Look for the section like this:
Code:
<IfModule mod_dir.c>
    DirectoryIndex index.html
</IfModule>
And make it look like this:
Code:
<IfModule mod_dir.c>
    DirectoryIndex index.html index.php
</IfModule>
You should also add an index.html to all subdirectories, which will redirect requests to your login page. [/edit]

Last edited by Cerbere; 06-15-2004 at 04:29 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant make web server run my local web page... Nik0s Linux - Newbie 22 10-08-2006 10:30 PM
SSL & SuSE - Get a 403 error when requesting secure page marigny Linux - Software 2 10-11-2005 05:25 AM
my web browser "mozilla fire fox" isn't rendering the page, rather opening the page amolgupta Linux - Software 2 07-26-2005 12:41 AM
Secure web server sanjibgupta Linux - Newbie 1 08-27-2003 07:05 AM
Jerky mouse when web browsers download web page stodge Linux - Software 1 07-08-2003 10:29 PM


All times are GMT -5. The time now is 09:50 PM.

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