Dokuwiki in one article

简介

官网: https://www.dokuwiki.org

DokuWiki 是一个开源 Wiki 软件(与著名的Wikipedia类似),它不需要数据库,简单易用。

安装

记得使用.htaccess 来禁止访问某些文件夹。Dokuwiki的帮助文档有介绍

管理

主题

插件

  • 修改页面标题: move

ACL

@ALL 表示所有用户
@User 表示登录的用户

如果页面A只想被管理员修改,我是这么设置的
@ALL 无权限
@User 读取权限
管理员 修改权限

使用LDAP认证用户

AD(Active Directory) & LDAP相关知识

http://www.zhukun.net/archives/8012
https://segmentfault.com/a/1190000002607140
http://m.blog.csdn.net/article/details?id=8937468

使用authldap插件

可以以管理员身份登陆,通过web界面进行配置,也可以直接修改配置文件,该文件位于 conf/local.php:

$conf['title'] = 'DacasWiki'; 		// wiki的名字
$conf['lang'] = 'zh';	      		// 语言
$conf['template'] = 'bootstrap3';	// 主题
$conf['license'] = '0';
$conf['useacl'] = 1;

$conf['authtype'] = 'authldap';
//$conf['authtype'] = 'authplain';

$conf['superuser'] = '@admin,caohongjin'; // 管理员,第一个表示一个组,也可以在后面添加单独的用户
$conf['disableactions'] = 'register';
$conf['plugin']['authldap']['server'] = ''; // ldap服务器地址,域名或ip都可以

$conf['plugin']['authldap']['usertree'] = 'ou=person,dc=example,dc=cn';
$conf['plugin']['authldap']['grouptree'] = 'dc=example,dc=cn';
$conf['plugin']['authldap']['userfilter']  = '(&(|(uid=%{user})(cn=%{user}))(objectClass=user))';

$conf['plugin']['authldap']['groupfilter'] = '(&(memberUID=%{user})(objectClass=orginalzitionalUnit))';

$conf['plugin']['authldap']['version'] = 3;	// 使用version3(重要)
$conf['plugin']['authldap']['binddn'] = 'cn=administrator,cn=Users,dc=example,dc=cn';
$conf['plugin']['authldap']['bindpw'] = '<b>XXXXXX';
$conf['plugin']['authldap']['userkey'] = '';
$conf['plugin']['authldap']['groupkey'] = '';
//$conf['plugin']['authldap']['debug'] = 1;	// 开启调试信息
$conf['plugin']['authldap']['debug'] = 0;

使用ldap认证方式后,如何设置某个用户为管理员呢?修改$conf['superuser']即可

$conf['superuser'] = '@admin,caohongjin'; // 管理员,第一个表示一个组,也可以在后面添加单独的用户

ldap_set_option ($ldapconn, LDAP_OPT_REFERRALS, 0);

ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);

###Problem

####只能搜索部分用户的问题 ldap_search :Operation error
http://stackoverflow.com/questions/6222641/how-to-php-ldap-search-to-get-user-ou-if-i-dont-know-the-ou-for-base-dn

Centos 7 + Nginx install Permission error

https://timothy-quinn.com/building-dokuwiki-on-centos-7/
https://forum.dokuwiki.org/thread/12117
https://forum.dokuwiki.org/thread/13231
SELinux : https://wiki.centos.org/HowTos/SELinux

Change SELinux to permissive solve this problem.

The ‘setenforce’ command may be used to switch between Enforcing and Permissive modes on the fly but note that these changes do not persist through a system reboot.
To make changes persistent through a system reboot, edit the ‘SELINUX=’ line in /etc/selinux/config for either ‘enforcing’, ‘permissive’, or ‘disabled’. For example: ‘SELINUX=permissive’

pdfjs failed in https but ok in http

这里写图片描述
这里写图片描述

could not connect to LDAP server

原因分析:
文件conf/local.php中设置了认证方式为ldap

$conf['authtype'] = 'authldap';

但是用于与ldap服务器交互的账号密码发生变化,导致连接ldap服务器失败。

修复方法:更新一下密码即可。

首先修改认证方式为authplain,添加superuser用户名为admin:

$conf['authtype'] = 'authplain';
$conf['superuser'] = 'admin';

打开文件 conf/users.auth.php, 在最后添加一个用户admin

admin:$1$4fd0ad31$.cId7p1uxI4a.RcrH81On0:-:-:admin,user 

其中$1$4fd0ad31$.cId7p1uxI4a.RcrH81On0为密码明文admin的哈希。

保存然后重启web服务。此时再打开登录页面,输入用户名admin,密码admin。然后在去管理页面更新ldap的密码。

最后再把authtype变为authldap即可。

$conf['authtype'] = 'authldap';
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值