Rushtafari
Instructor
I am administering a Web server that has about ten individual user accounts. I would like to create a directory in each of their public_html directory called "restricted." Any material inside that directory should be unviewable from anyone trying to access them. (Once I get that working I will consider slight modifications per my specific needs.)
Now, this is a common question and I found lots of help, but nothing seems to actually work.
The first thing I tried was to use the httpd.conf file to do the job. But that was somewhat confusing. (If someone can tell me how to do it, I would appreciate it because I would rather use this approach.)
I then tried using an .htaccess file. So in one of the public_html directories I performed the following commands:
$ mkdir restricted
$ chmod restricted
$ cd restricted
$ vi .htaccess
I then inserted the following text into .htaccess.
<LIMIT GET POST>
order deny, allow
deny from all
allow from none
</LIMIT>
I then changed the permissions:
$ chmod 644 .htaccess.
That didn't work. I can still view documents placed inside this directory.
So I figured that there must be something in httpd.conf that is overriding my .htaccess commmands. I found some items that looked like the culprit, so I made the following change:
AllowOverride All
I figure this allows my deny and allow commands in .htaccess to be executed.
So I restarted Apache and, again, the Web page keeps appearing.
So what am I forgetting? Anyone?
Now, this is a common question and I found lots of help, but nothing seems to actually work.
The first thing I tried was to use the httpd.conf file to do the job. But that was somewhat confusing. (If someone can tell me how to do it, I would appreciate it because I would rather use this approach.)
I then tried using an .htaccess file. So in one of the public_html directories I performed the following commands:
$ mkdir restricted
$ chmod restricted
$ cd restricted
$ vi .htaccess
I then inserted the following text into .htaccess.
<LIMIT GET POST>
order deny, allow
deny from all
allow from none
</LIMIT>
I then changed the permissions:
$ chmod 644 .htaccess.
That didn't work. I can still view documents placed inside this directory.
So I figured that there must be something in httpd.conf that is overriding my .htaccess commmands. I found some items that looked like the culprit, so I made the following change:
AllowOverride All
I figure this allows my deny and allow commands in .htaccess to be executed.
So I restarted Apache and, again, the Web page keeps appearing.
So what am I forgetting? Anyone?