Re: Combining Basic Authentication with Access Restriction by IP Address and auth_basic off

2018-06-27 Thread basti
On 27.06.2018 15:57, Ruslan Ermilov wrote: > Since you have switched auth_basic off, the only enabled authentication > left is by client address, and your inherited configuration says it's > denied for everything except . Put "allow all" into the > "location /.well-known/acme-challenge/" to hav

Re: Combining Basic Authentication with Access Restriction by IP Address and auth_basic off

2018-06-27 Thread Ruslan Ermilov
On Wed, Jun 27, 2018 at 03:08:50PM +0200, basti wrote: > Hello, > I have a config like: > > server { > > ... > # combine basic auth and ip whitelisting > # > https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/

Combining Basic Authentication with Access Restriction by IP Address and auth_basic off

2018-06-27 Thread basti
Hello, I have a config like: server { ... # combine basic auth and ip whitelisting # https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ satisfy any; allow ; deny all; auth_basic "Restricted"; auth_basic_user_file /etc

Re: Basic authentication

2017-01-13 Thread lacibaci
Thanks, i found it just above. It looks like this: location ~* \.php { fastcgi_pass unix:/run/php-fpm/php56-fpm.sock; } I would like to keep existing behavior (no user/passwd needed) except when clients try to execute php in /private... directory. Something like this: location ~* /private*\.

Re: Basic authentication

2017-01-13 Thread Jim Ohlstein
Hello, On 01/13/2017 04:42 PM, lacibaci wrote: I have a location that I would like to protect: location /private { satisfy any; allow 192.168.1.0/24; deny all; auth_basic "Protected"; auth_basic_user_file conf/htpasswd; } This works for /private /private/ and /

Basic authentication

2017-01-13 Thread lacibaci
I have a location that I would like to protect: location /private { satisfy any; allow 192.168.1.0/24; deny all; auth_basic "Protected"; auth_basic_user_file conf/htpasswd; } This works for /private /private/ and /private/somefile.html However, when I request (GE

Re: nginx nested location and different basic authentication file

2015-09-30 Thread cacrus
Thanks for the replies . I figured out the issue . This was not related to Nginx Config . The requests i was trying to route had an issue . Btw , I shifted to map as well and both configurations worked. Thanks for your comments and appreciate it . Posted at Nginx Forum: http://forum.nginx.o

Re: nginx nested location and different basic authentication file

2015-09-29 Thread Francis Daly
On Sun, Sep 27, 2015 at 04:32:56AM -0400, cacrus wrote: Hi there, Your Subject: mentions "nested location"; but your config doesn't seem to show any explicit nesting. > location /parent/ { > set $basic_file /nginx/conf/.htpasswd; > if ($request_uri ~ (vi

Re: nginx nested location and different basic authentication file

2015-09-27 Thread Christ-Jan Wijtmans
Not an nginx expert but i think you can use a map http://nginx.org/en/docs/http/ngx_http_map_module.html You dont even need an if. Live long and prosper, Christ-Jan Wijtmans https://github.com/cjwijtmans http://facebook.com/cj.wijtmans http://twitter.com/cjwijtmans On Sun, Sep 27, 2015 at 10:32

nginx nested location and different basic authentication file

2015-09-27 Thread cacrus
Hi , I am trying to setup different authentication based on different strings in the $request , here is my case . location /parent/ { set $basic_file /nginx/conf/.htpasswd; if ($request_uri ~ (visualize|dashboard|settings)){ set $basic_f

Re: reverse proxy + basic authentication

2015-09-16 Thread Steve Wilson
r for some good hours but haven't found so i'm trying here. I have a website on some different server, which does not have any authentication. (So it loads directly the private stuff) I have configured nginx as a reverse proxy which is pretty clear, and works fine. Is it possible to conf

reverse proxy + basic authentication

2015-09-15 Thread derp14
ured nginx as a reverse proxy which is pretty clear, and works fine. Is it possible to configure basic authentication in nginx as the only layer of authentication, and if this is succesfull continue with the reverse proxy role and load the website from a different server? Thank you! Posted at Ngi

Re: Protect /analytics on Nginx with basic authentication, but allow access to .php and .js files??

2015-02-12 Thread lmm5247
> What actual requests are made that are challenged for > authentication? Check your access_log for http 401. > > At a guess, it is just /analytics/piwik.js that you care about here. > > So: add > > location = /analytics/piwik.js {auth_basic off;} > > inside your "location /analytics {}" bloc

Re: Protect /analytics on Nginx with basic authentication, but allow access to .php and .js files??

2015-02-11 Thread Francis Daly
On Wed, Feb 11, 2015 at 11:45:46AM -0500, lmm5247 wrote: Hi there, > I have Piwik setup and running on a Nginx webserver that I protected with > HTTP basic authentication, as seen below. > > location /analytics { > alias /var/www/piwik/; > auth_basic "Restricted";

Protect /analytics on Nginx with basic authentication, but allow access to .php and .js files??

2015-02-11 Thread lmm5247
Hey folks, Nginx noob here. I also posted here with no luck yet: http://forum.piwik.org/read.php?2,123492 I have Piwik setup and running on a Nginx webserver that I protected with HTTP basic authentication, as seen below. location /analytics { alias /var/www/piwik/; auth_basic "Restr

Re: How to redirect only if/after a FAILED basic authentication?

2013-09-22 Thread Francis Daly
On Sun, Sep 22, 2013 at 02:14:55PM -0700, jen...@promessage.com wrote: Hi there, > Now, if a visitor: > > (1) enters bad (or no) crendentials > (2) clicks "Cancel" on the BASIC auth dialog box > > the site displays a > > "401 Authorization Required" > > page. For accuracy:

How to redirect only if/after a FAILED basic authentication?

2013-09-22 Thread jen142
I'm setting up an auth-before-proxy_pass config. The following works now: location / { root /dev/null; auth_basic "Restricted Remote"; auth_basic_user_file /data/etc/security/auth/passwd.basic; proxy_pass