Hi All,
I got it working now by adding the below code. Hope it will be useful for
who ever may need or looking for a solution. Only whitelisted IP addresses
can do directory listing, other IP addresses can only download the files.
nginx.conf
http{
geo $geoAutoIndexWhitelist {
default
Hi Igor,
I tried your config and getting error, can you help me.
location / {
alias /downloads/;
root /data/files;
autoindex on;
if ($forbidlisting) {
rewrite ^/(.*) /noindex_root/$1 last;
}
}
location /noindex_root/ {
internal;
alias /downloads/;
}
nginx: [em
Hi guys,
The base name of a web application has changed and now I need to implement a
redirection of POST requests so that, whenever clients already using the old
base path are not affected by this modification. So, let's say the old path
to a web service is https://ip-address/old-name/rest/mymet
This works for me:
location / {
alias /downloads/;
autoindex on;
if ($forbidlisting) {
rewrite ^/(.*) /noindex_root/$1 last;
}
}
location /noindex_root/ {
internal;
alias /downloads/;
}
On 18.05.2018 19:32, Sathish Ku
On Fri, May 18, 2018 at 12:59:32PM +0200, Marcello Lorenzi wrote:
Hi there,
> we're trying to configure a client certificate authentication on a Nginx
> 1.12.2 instance on our development environment, and all works fine. We
> would filter the access to a specific site with some particular client
On Fri, May 18, 2018 at 08:05:34AM +0800, Sathish Kumar wrote:
Hi there,
> We have a requirement to allow directory listing from few servers and
> disallow from other ip addresses and all IP addresses should be able to
> download all files inside the directory.
"Directory listings" is presumably
Hi,
I am doing for location /, in that case how will have to change the below
portion.
location /downloads {
alias /downloads/;
autoindex on;
if ($forbidlisting) {
rewrite /downloads(.*) /noindex_downloads/$1 last;
}
}
location /noindex_downloads/ {
internal;
alias
Sathish,
I made a couple of minor mistakes.
Please, try following configuration:
map $remote_addr $forbidlisting {
default 1;
1.1.1.1 0;
}
location /downloads {
alias /downloads/;
autoindex on;
if ($forbidlisting) {
rewrite /downloads(.*) /noindex_downloads/$1 last
Hello!
On Thu, May 17, 2018 at 11:03:08PM +0100, Pete Cooper wrote:
> I am compiling Nginx 1.14.0 from source on Ubuntu 18.04 LTS with
> a view to compiling ipscrub as a dynamic module.
>
> My compile completes without error, my nginx.conf validates,
> Nginx runs as expected, yet my server bl
Since this requires more logic, I think you can implement this in an
application server / server-side scripting like php/python etc
your application must verify the IP address and list files rather than web
server
On Fri, May 18, 2018 at 6:25 PM, Sathish Kumar wrote:
> Hi,
>
> I tried this opt
Hi,
Tried this option it throws rewrite error and am not able to download file
from non whitelisted ip addresses.
ERROR:
rewrite or internal redirection cycle while processing
"/noindex_downloadsnoindex_downloadsnoindex_downloadsnoindex_downloadsnoindex_downloadsnoindex_downloadsnoindex_download
Hi,
I tried this option but it says autoindex need to be on or off and it's not
accepting a variable.
[emerg] invalid value "$allowed" in "autoindex" directive, it must be "on"
or "off" in domain.conf
On Fri, May 18, 2018, 7:18 PM Friscia, Michael
wrote:
> I think you need to change this a li
Hello, guys.
I think, you can try something like this:
location = /downloads/ {
root /downloads/;
allow 1.1.1.1;
autoindex on;
}
location /downloads/ {
root /downloads/;
}
This will work nicely if you don't need subdirectories.
If you need those, you can use a rewrite like:
map
I think you need to change this a little
map $remote_addr $allowed {
default “off”;
1.1.1.1 “on”;
2.2.2.2 “on:;
}
and then in in the download location block
autoindex $allowed;
I use similar logic on different variables and try at all costs to avoid IF
statem
Hi All,
we're trying to configure a client certificate authentication on a Nginx
1.12.2 instance on our development environment, and all works fine. We
would filter the access to a specific site with some particular client
certificate to avoid that other certificates trusted by the same CA can
acce
15 matches
Mail list logo