Closed mig5 closed 8 years ago
I took out this line which you instructed to put at the top of /etc/nginx/nginx.conf:
include /etc/nginx/modules-enabled/*.conf;
And now nginx starts fine with those ldap settings.
This strikes me as a problem, since apparently we depend on this line being present now? Would my upgrade have failed if I didn't have the line in?
Also just realised that earlier today I have upgraded existing Jessie machines to Nginx 1.10 and accidentally forgot to include the 'include /etc/nginx/modules-enabled/*.conf;' line there. And so they are working fine (they use the ldap config too).
Seems to contradict the requirement that we must include the line? My upgrades were clean without it..
After rebooting, now I can't start nginx whether or not the 'include' line is there. The only way I can start it is if I comment out the 'auth_ldap_servers' from the vhost.
This is weird as it worked without an issue on just a point-release upgrade on 13 Jessie machines earlier today, which never had the 'include' line and still don't :(
Just to clarify the situation :
auth-ldap
is only included in nginx-extras
, not in other flavorsAs a consequence :
include /etc/nginx/modules-enabled/*.conf;
is not required for auth-ldap
to work as soon as you have nginx-extras
installed on your machineinclude
is strictly required only if you use directives from the dynamically-loaded modules : http-auth-pam, http-geoip, http-image-filter, http-lua, http-ndk, http-perl, http-xslt-filter, stream and mail.Given this, could you please double check your setup while I investigate on my side?
Thanks.
Yes, just clarifying that all these machines use nginx-extras (I only use your packages for Nginx because I depend on auth-ldap)
I don't use any of those other modules, perhaps this is why the absence of the 'include' works on my first 13 machines which were already using Jessie 1.8.1-1~dotdeb+8.1 (then upgraded to 1.10.1-1~dotdeb+8.2 without issue)
On this new machine, I went from Wheezy on an earlier Nginx version, but still using nginx-extras, to 1.10.1-1~dotdeb+8.2, and after reboot it would not start whether or not the 'include' line was there (as you said, it makes no difference).
I just downgraded it to 1.8.1-1~dotdeb+8.1, where auth_ldap config still in use exactly as above, and no 'include' line (no more /etc/nginx/modules-enabled/*.conf), and it is working fine there now.
Just remains a mystery for me why this machine was different - the only difference was jump from Wheezy to Jessie but the config is exactly the same otherwise.
I just tested to install nginx-extras
on a clean Jessie, with the following minimal configuration :
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 12288;
}
http {
add_header Ping pong;
server {
listen 80;
root /var/www/html;
}
ldap_server ldap1 {
url ldaps://ldap.example.com/dc=example,dc=com?uid?sub?(objectClass=person);
group_attribute memberUid; # default 'member'
group_attribute_is_dn off; # default on
require valid_user;
require group "cn=staff,ou=Groups,dc=example,dc=com";
satisfy any;
}
}
No unknown directive
error was thrown, just a timeout because ldap.example.com
does not answer.
Could you please reproduce this case and confirm that the auth-ldap
directives are available in such a simple setup?
I will do that, can you try putting 'auth_ldap_servers ldap1;' in your server { } block and restart nginx? That way it matches my config better (actually instantiating ldap auth on a vhost)
OK I apologise, this looks like a red herring. It relates to a bad Apt Pin on nginx during the wheezy->jessie upgrade, which resulted in Debian trying to install nginx-full somehow to resolve a dependency problem. Not exactly clear why the issue continued after I was sure nginx-extras was installed, but it is somehow related.
I just fixed the pin and did an apt-get dist-upgrade (remember I downgraded to 1.8) and it cleanly upgrade to 1.10.
Sorry for wasting your time, thanks for your tests.
No problem. I'm glad to help.
Hi,
I upgraded to Nginx 1.10.1 on via an upgrade of a Wheezy machine to Jessie, but now it seems nginx-auth-ldap module doesn't work, even though it says it's included.
Nginx won't start:
'strings /usr/sbin/nginx' shows the auth_ldap_servers stuff.
In my /etc/nginx/nginx.conf inside the http { } block I have:
And in my vhost:
Any idea what could cause this?