I have Ubuntu 16.04 LTS and I used this guide to build Nginx with this LDAP module.
I believe my trouble is that guide uses an older /etc/init.d script that doesn't work so well with 16.04. I then tried this newer script for systemd which sort of works but I'm getting some weird service behavior.
Currently I can "systemctl start nginx" and the service starts (the web server works) but I have to ctrl-c to get my command back. "systemctl status nginx" will show this below. "systemctl stop nginx" does not stop the nginx web server. In order to stop nginx I have to "systemctl kill nginx". I did find that /usr/local/nginx/logs/nginx.pid file missing but creating it myself didn't fix that error.
From here I'm kind of lost, how do I fix this?
● nginx.service - LSB: nginx init.d dash script for Ubuntu or other *nix.
Loaded: loaded (/etc/init.d/nginx; bad; vendor preset: enabled)
Active: activating (start) since Thu 2018-04-05 15:44:43 EDT; 48s ago
Docs: man:systemd-sysv-generator(8)
Process: 28806 ExecStart=/etc/init.d/nginx start (code=exited, status=0/SUCCESS)
Tasks: 2
Memory: 9.2M
CPU: 29ms
CGroup: /system.slice/nginx.service
├─28815 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.con
└─28816 nginx: worker process
Apr 05 15:44:43 ubuntu systemd[1]: Starting LSB: nginx init.d dash script for Ubuntu or other *nix....
Apr 05 15:44:43 ubuntu nginx[28806]: * Starting Nginx Server...
Apr 05 15:44:43 ubuntu nginx[28806]: ...done.
Apr 05 15:44:43 ubuntu systemd[1]: nginx.service: PID file /usr/local/nginx/logs/nginx.pid not readable (yet?) after start: No such file or directory