Auth.proxy ERR_UNEXPECTED_PROXY_AUTH

Hi,
I configured proxy authentication but in chrome still get this error: ERR_UNEXPECTED_PROXY_AUTH and in IE and Firefox i got a webpage with inside “Proxy Authentication Error”.

Grafana config is:
[auth.proxy]
enabled = true
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true
whitelist = 192.168.1.75
;ldap_sync_ttl = 60
;whitelist = 192.168.1.1, 192.168.2.1

Apache config is:
<VirtualHost *:80>
ServerName grafana.marcolino7.myds.me

	<Proxy *>
			AuthType Basic
			AuthName GrafanaAuthProxy
			AuthBasicProvider file
			AuthUserFile /etc/apache2/sites-enabled/.htpasswd
			Require valid-user

			RewriteEngine On
			RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER},NS]
			RequestHeader set X-WEBAUTH-USER "%{PROXY_USER}e"
		</Proxy>

		RequestHeader unset Authorization

		ProxyRequests Off
		ProxyPass / http://192.168.1.75:3000/
		ProxyPassReverse / http://192.168.1.75:3000/

	
	
	
    ErrorLog /var/log/apache2/vhost80-error.log
    CustomLog /var/log/apache2/vhost80-access.log combined

Grafana with work as expected if accessed direclty, or trough a Reverse proxy without authentication
Any help would be appreciated.

Marco

Hi,
I found the isse. It was in whitelist
It is possible to define a complete subnet or I can define only single address?
It is possible to use a hostname?

Marco

It only takes in a single address or a list of comma separated addresses. It can be an IP address or a domain (or a domain with port). Usually you only have one proxy server you want to add to the whitelist.

1 Like

Many Thanks for help.

Marco