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 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法