.htaccess equivalent on nginx
(3 posts)
(2 voices)
-
Hi!
Can you please cover how one go about protecting a directory on Nginx?
In apache, if I wanted to avoid files ending on .tpl i'd just put an .htaccess on the directory with:
<files ~ "\.tpl$">
order deny,allow
allow from none
deny from all
</files>How do one go about doing the same thing for Nginx?
Cheers!
Posted 2 years ago # -
Found the answer :-D
I'm a total newbie when it comes to linux so I'm very proud hehehe.
location ~ \.tpl$ {
deny all;
}Cheers!
Posted 2 years ago # -
hey Leo, also check out:-
» tutorial » Password-Protected Web Pages
.. there's loads of tuts like that on this site .. I need to organise them so they're more easily found
Posted 2 years ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
