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?.

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

报告相同问题?

悬赏问题

  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上