I have a PHP web app that is built in a Docker Container, which runs on an Apache Webserver.
Everything works correctly when I deploy my Docker image on the webserver.
But now I added a LDAP check inside my Docker image using this module:
RUN a2enmod authnz_ldap
so what should happen is, when you start the Web app, it would prompt you a login popup, and then it will check the credentials with LDAP, if authorized, you proceed to the Web App.
If I run the docker image locally (with powershell, docker run -p 80:80
), everything works correctly, I insert my credentials and I'm granted access, and also from the Docker logs I see everything is working without errors.
But when I deploy the same image to our webserver, as soon as you run it, the POD (we use phive to manage the images and push them online) goes offline because of an error, and from the logs I see this:
2019-06-18T12:26:19.482431730Z [Tue Jun 18 12:26:19.482096 2019] [authz_core:debug] [pid 19] mod_authz_core.c(809): [client 10.103.12.254:41962] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
2019-06-18T12:26:19.482532132Z 10.103.12.254 - - [18/Jun/2019:12:26:19 +0000] "GET / HTTP/1.1" 401 670 "-" "Go 1.1 package http"
2019-06-18T12:26:19.513800826Z [Tue Jun 18 12:26:19.513436 2019] [core:info] [pid 1] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=1)
2019-06-18T12:26:19.513850727Z [Tue Jun 18 12:26:19.513481 2019] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down
this happens right after we publish the image, and I have no clue why, because if built locally, it works perfectly!
What could this be? The server we are deploying to is the same where our LDAP is (all internal networks), so it's not that the LDAP address cannot be reached from here.