Skip to content

dokuwiki_nginx

参考链接

(链接一)[https://www.dazhuanlan.com/varorbc/topics/1405087] (链接二)[https://m.jb51.cc/ubuntu/353057.html]

安装

链接2中为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。 这个在nginx中配置成deny,不让访问就可以((在nginx的配置文件中))。

sudo apt-get update
sudo apt-get install php
sudo apt-get install php-xml
sudo apt-get install php-fpm

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
sudo tar -zxvf dokuwiki***

cd dokuwiki
sudo chown -R www-data:www-data data conf

sudo vim /etc/nginx/sites-enabled/default
下面配置可用

# Default server configuration
#
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /home/pi/dokuwiki/dokuwiki;
        index index.html index.htm index.nginx-debian.html index.php;
        server_name _;

        location / {
                try_files $uri $uri/ =404;
        }
        location ~ /(data|conf|bin|inc|vendor)/ {
                deny all;
        }


        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        }

}

sudo service nginx restart

访问url即可配置
http://192.168.31.7/install.php

然后删除install.php,或者改名字

常用插件

一些参考链接 * https://www.cnblogs.com/liuchangchun/p/4727187.html * http://www.dokuwiki.com.cn/272.html

  • Add New Page Plugin 方便创建页面
  • Markdown Page Plugin markdown语法支持 ...... 中间进行编辑

  • arctic-mbo Template 简单主题

  • BackupTool for DokuWiki 备份docuwiki
  • Indexmenu Plugin 菜单导航栏目

Indexmenu 和 Add New Page Plugin 在sidebar中这样写

配置设置中选择 ====== all ====== {{indexmenu>#1}} 或者{{indexmenu>..#1|msort}} ====== ccc ====== {{NEWPAGE}} ===== FAQ ===== - 插件安装时,提示插件目录不可写 - 进入dokuwiki目录,将所有目录改为 sudo chmod -R 777 lib - 插件安装提示如法下载 - 复制网页链接,下载后通过手动上传实现安装