Hi.
I want to create an nginx rule, but I don’t known how to start off.
Please help me. Thanks.
the .htaccess file is in the /download/ directory, and the rule is
Order deny,allow
Deny from all
How to convert it to nginx rule?
Regards.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,9118,9118#msg-9118
You use the deny directive
http://wiki.nginx.org/NginxHttpAccessModule#deny
location / {
deny all;
}
Ray
On Fri, Sep 25, 2009 at 10:03:15AM +0800, Ray wrote:
You use the deny directive
http://wiki.nginx.org/NginxHttpAccessModule#deny
location / {
Hi, Igor.
location /download/ {
deny all;
}
This rule would deny access to all files, but I only want to deny access
to ‘config’ file. Can modify this rule only deny ‘config’ file?
Order deny,allow
Deny from all
Thanks.
Igor S. Wrote:
I want to create an nginx rule, but I don’t
How to convert it to nginx rule?
–
Igor S.
http://sysoev.ru/en/
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,9118,9213#msg-9213
Hi. Igor.
Thank you.
This is was not obvious from your first message:
Sorry. I expresses my thoughts unarticulately.
location = /download/config {
deny all;
}
if include subdirectory, May I modify it to the following example?
location ~ /download/*/config {
deny all;
}
Best Regards.
Igor S. Wrote:
modify this rule only deny ‘config’ file?
On Fri, Sep 25, 2009 at 10:03:15AM +0800, Ray
I want to create an nginx rule, but I
–
Igor S.
http://sysoev.ru/en/
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,9118,9320#msg-9320
location ~ /download/*/config {
If I’m not mistaken, this would match “/download////////config” as well
as “foo/download///config”, but not “/download/foo/config”
Try
location ~ ^/download/.*/config
On Fri, Sep 25, 2009 at 09:36:16AM -0400, filebackup wrote:
Hi, Igor.
location /download/ {
deny all;
}
This rule would deny access to all files, but I only want to deny access to ‘config’ file. Can modify this rule only deny ‘config’ file?
Order deny,allow
Deny from all
This is was not obvious from your first message:
location = /download/config {
deny all;
}
Dennis,
Thank you.
I will try it.
location ~ ^/download/.*/config
Dennis B. Wrote:
location ~ /download/*/config {
If I’m not mistaken, this would match
“/download////////config” as well
as “foo/download///config”, but not
“/download/foo/config”
Try
location ~ ^/download/.*/config
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,9118,9452#msg-9452