====== Log: 网站维护记录 ======
===== 4. Plugins =====
用Admin里的Extension Manager功能,里面有一个tag是Search and Install,用这个在线安装如下三个插件:
- mathjax: 显示数学公式功能 https://www.dokuwiki.org/plugin:mathjax 页面里说可修改配置给方程自动编号,可惜不work;还能调整默认大小如150%,work但同时影响inline方程行的行距,不美
- imagebox: 显示图片的caption,如wikipedia一般 https://www.dokuwiki.org/plugin:imagebox
- sortablejs: 给表格的某列增加排序功能 https://www.dokuwiki.org/plugin:sortablejs
===== 3. Security =====
Dokuwiki在默认根目录下有一个叫.htaccess.dist的文件,里面已经设好了必要的安全措施,主要就是防止对4个目录(data, conf, inc, vendor)的读写。只需要打开Apache的支持htaccess的功能即可。具体为:编辑/etc/httpd/conf/httpd.conf中涉及/var/www/html的部分如下:
# Further relax access to the default document root:
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
# XW(20200808): I change this from None to All
AllowOverride All 我就只把这行的None改为All即可
#
# Controls who can get stuff from this server.
#
Require all granted
===== 2. PHP upload limit =====
* modify /etc/php.ini so as to allow upload big file in MediaManager
* upload_max_filesize = 500M (from 100M) 原来装MediaWiki时改到100M,现在再扩大
* post_max_size = 500M (from 128M) 原来装mediaWiki时改到128M,现在再扩大
* restart apache by "service httpd restart" to active new PHP settings
--- //[[wensir365@163.com|Xinyu Wen]] 2020/07/02 01:46//
===== 1. Installation =====
* download tarball from official website
* tar xzvf the tgz file at /var/www/html, generate dokuwiki directory
* mv dokuwiki to group, this is the name I want
* use root, chown -R apache:apache group 修改group下所有文件和目录的归属属性
* use browser, visit /group/install.php to setup initially 初始化,之后这个php文件就消失了。我后来发现好像没有自动消失,我把install.php改为install.php.old了
* generate /conf/tpl/dokuwiki/style.ini to change page width and background color
* upload logo.png and favicon.ico to namespace of /wiki in MediaManager
--- //[[wensir365@163.com|Xinyu Wen]] 2020/06/22 12:26//
===== 0. Background =====
2019年底(参见2019年11月1日22:10的Email,标题为“网络安全风险通知”),原来的组网站 www.phy.pku.edu.cn/climate 因为php安全漏洞被北大计算中心暂时封闭。后2020年6月,物理学院为配合北大将faculty主页全部收归校方统一管理,准备清理所有在 www.phy.pku.edu.cn 上托管的网页。所以,在2020年6月这个关口,我们干脆把组网站从物理学院服务器上整体拿出来,放到云主机pkumet.live上,在北大官方的faculty页面上只保留一个链接,link到这里。