duanhuan6857 2019-06-21 08:19
浏览 91
已采纳

Apache上的Docker,如何将变量传递给我的PHP Web应用程序?

I have a PHP WebApp, built in a Docker Container and hosted on Apache Web Server.

This App is only used internally on intranet, and I'm trying to figure out a way to allow logins based on the Windows Username (Single sign on), but for Apache there are only a few solutions that are outdated.

So what I'm trying to do, I implemented in Docker a Login with LDAP, using this module:

RUN a2enmod authnz_ldap

So when the user tries to access the Web App, a popup will display asking to login.

This all works correctly, my next step, is to pass the Username the User inputs in that popup to my Web Application.

So then, my Web Application will use that username to manage the permissions, showing and hiding parts of the Web App.

So how do I pass that username to my Application? I'm pretty new with docker so I have no clue on how I could achieve this, could someone help me out?

  • 写回答

1条回答 默认 最新

  • douquan1015 2019-06-21 15:22
    关注

    If I understand this correctly the Apache serving your app is inside the Docker container. Then Docker is out of the equation and your question is reduced to How do I retrieve the user information of a user authenticated with Apache's mod_ldap?.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?