: Apache blocks I'm trying to make it so that the outside world can't access a specific section of my website. What I did was: <Directory /Library/WebServer/.../secrets/> Order deny,allow
I'm trying to make it so that the outside world can't access a specific section of my website. What I did was:
<Directory /Library/WebServer/.../secrets/>
Order deny,allow
Deny from all
Allow from 10.0.1.18
</Directory>
(10.0.1.18 is my computer's internal IP) That seemed to work for the root folder, but not for subfolders. So I tried secrets/* in the directory block, but that disabled everything. Anyone could access the secrets folder.
How would I make the directory block apply to subfolders?
More posts by @Reiling115
1 Comments
Sorted by latest first Latest Oldest Best
According to this:
<Directory> and </Directory> are used to enclose a group of directives
that will apply only to the named directory, sub-directories of that
directory, and the files within the respective directories.
So if you omit the trailing slash then this should work:
<Directory /Library/WebServer/.../secrets>
secrets/* means subdirectories and files below the secrets directory, not the directory itself.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.