CentOS 7下源码部署phpLDAPadmin

官网:http://phpldapadmin.sourceforge.net

源码

注:官方最新源码不兼容PHP 7,改造成本较大,推荐下载第三方代码

配置

1
# cp config/config.php.example config/config.php

若search报错:

1
E_WARNING: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
1
# vim lib/QueryRender.php

找到:

1
2
3
4
5
if (! $results) {
echo _('Search returned no results');

continue;
}

改为:

1
2
3
4
5
if (! $results) {
echo _('Search returned no results');

break;
}

Nginx配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
server {
listen 80;
server_name ldap.yezhou.cc;
index index.html index.htm index.php;
root /data/www/phpldapadmin;
server_name_in_redirect off;

# 配置ip限制策略
include blockip.conf;

location ~ .+\.php($|/)
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;

fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
}

#伪静态及日志
#include /data/server/nginx/conf/rewrite/index.conf;
error_log /data/www/logs/phpldapadmin-error.log;
access_log /data/www/logs/phpldapadmin-access.log;
}

登录

在浏览器输入OpenLDAP服务端的域名:https://ldap.yezhou.cc

登陆:用户cn=admin,dc=sys,dc=com,密码:123456

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :