跳转至内容

phpLDAPadmin

来自 ArchWiki

phpLDAPadmin 是一个基于 Web 的 LDAP 管理界面。

安装前准备

有关设置 Apache、MySQL 和 PHP 的指南,请参阅 LAMP

安装

安装 phpldapadmin 包。

配置

Apache

本文或本章节已过时。

原因:phpldapadmin-2 使用 systemd 服务 (讨论于 Talk:PhpLDAPadmin)

创建 Apache 配置文件

/etc/httpd/conf/extra/phpldapadmin.conf
Alias /phpldapadmin "/usr/share/webapps/phpldapadmin"
<Directory "/usr/share/webapps/phpldapadmin">
    DirectoryIndex index.php
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

并将其包含在 /etc/httpd/conf/httpd.conf

# phpLDAPadmin configuration
Include conf/extra/phpldapadmin.conf

默认情况下,任何人都可以看到 phpLDAPadmin 页面,要更改此设置,请根据需要编辑 /etc/httpd/conf/extra/phpldapadmin.conf。例如,如果您只想从同一台机器访问它,请将 Require all granted 替换为 Require local

PHP

您需要通过编辑 /etc/php/php.ini 并取消注释以下行来启用 PHP 中的 ldapgettext 扩展。

extension=ldap
extension=gettext

您需要确保 PHP 可以访问 /usr/share/webapps/etc/webapps。在 /etc/php/php.ini 中将它们添加到 open_basedir 

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps

phpLDAPadmin 配置

本文或本章节已过时。

原因:phpldapadmin-2 现在使用 .env 文件,请参阅 wiki (讨论于 Talk:PhpLDAPadmin)

phpLDAPadmin 的配置文件位于 /etc/webapps/phpldapadmin/config.php。如果您有本地 LDAP 服务器,无需进行任何修改即可使用。

如果您的 LDAP 服务器不在 localhost 上,请取消注释并编辑以下行

$servers->setValue('server','host','127.0.0.1');

虽然不是严格必需的,但您可以编辑以下行来命名您的服务器

$servers->setValue('server','name','My LDAP server');

访问您的 phpLDAPadmin 安装

您的 phpLDAPadmin 安装现已完成。在使用它之前,您需要重新启动 Apache。

您可以通过访问 https:///phpldapadmin/ 来访问您的 phpLDAPadmin 安装。

© . This site is unofficial and not affiliated with Arch Linux.

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.