Welcome! Log In Create A New Profile

Advanced

Basic Auth only for external IPs and not localhost or LAN networks

Quintin Par
February 14, 2012 11:34PM
Hi all,

I have a location directive with basic auth in it.

location / {

auth_basic "Admin Login";

auth_basic_user_file /etc/nginx/.htpasswd;

How do I specify a rule such that the basic auth is applied only to
external IPs and not to 127.0.0.x, 192.0.x & 10.0.x?

I run Jenkins from a sub-domain and my git post-commit-hook needs to hit a
URL under this location directive to trigger continuous integration. But
this Jenkins cannot handle basic auth that blocks the URL submit.

-Quintin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Basic Auth only for external IPs and not localhost or LAN networks

Quintin Par February 14, 2012 11:34PM

Re: Basic Auth only for external IPs and not localhost or LAN networks

António P. P. Almeida February 15, 2012 12:02AM

Re: Basic Auth only for external IPs and not localhost or LAN networks

António P. P. Almeida February 15, 2012 12:48AM

Re: Basic Auth only for external IPs and not localhost or LAN networks

Maxim Dounin February 15, 2012 04:10AM

Re: Basic Auth only for external IPs and not localhost or LAN networks

Quintin Par February 15, 2012 05:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready