Go Back   SitePoint Forums > Forum Index > Host Your Site > Server Management
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Mar 1, 2004, 12:32   #1
Rushtafari
SitePoint Member
 
Join Date: Mar 2004
Location: Fresno, CA
Posts: 2
Restricted access not too restrictive

I realize this is an age-old question, but I must be doing something wrong.

I am administering a FreeBSD (v4.9) Apache2 Web server for about ten users. In each public_html directory I want to create a directory called "restricted." I want documents placed inside this directory to be unaccessible to anyone trying to access them from a certain domain.

My first questions is, can I establish this restriction in my httpd.conf and apply it to all subdirectories of public_html titled "restricted"? If so, how?

I tried using an .htaccess file, and here is what happens:

First, I thought I would try shutting EVERYONE out of the directory, to test my Apache power. So I first modified the httpd.conf directory:

<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

I already have a .htaccess file created. Let me show you a series of commands that may hold a clue to my problem:
--------------------------

$ cd public_html/restricted

$ ls -al

drwxr-xr-x 2 jwalkup fac 512 Feb 29 12:22 .
drwxr-xr-x 8 jwalkup fac 1024 Mar 1 08:07 ..
-rw-r--r-- 1 jwalkup fac 31 Mar 1 10:47 .htaccess
-rw-r--r-- 1 jwalkup fac 6594 Feb 27 11:52 oma.html

$ more .htaccess

Order allow,deny
Deny from all

------------------------

Okay, any files placed inside the directory should be unviewable, right? Well, you can see oma.html for yourself:

http://faculty.natuniv.edu/~jwalkup/restricted/oma.html

What am I forgetting? This is driving me crazy.
Rushtafari is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
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
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 14:47.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved