webapps:dokuwiki
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| webapps:dokuwiki [2021/06/18 16:36] – external edit 127.0.0.1 | webapps:dokuwiki [2023/11/29 14:16] (current) – [DokuWiki Installation] lucid | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== DokuWiki Installation ====== | ====== DokuWiki Installation ====== | ||
| - | This install guide is a how-to for installing DokuWiki Ubuntu server | + | This install guide is a how-to for installing DokuWiki Ubuntu server |
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| - | Files needed | + | Packages required |
| - | sudo apt install | + | sudo apt install |
| sudo apt install nginx | sudo apt install nginx | ||
| Line 12: | Line 12: | ||
| Download and extract DokuWiki stable to the proper directory. | Download and extract DokuWiki stable to the proper directory. | ||
| wget -c https:// | wget -c https:// | ||
| - | | + | |
| - | sudo tar xvf dokuwiki.tgz -C /var/www/ | + | sudo mv /var/www/dokuwiki* /var/www/dokuwiki |
| - | ===== Let's Encrypt | + | ===== Configure nginx ===== |
| - | For SSL use the EFF's PPA for the Let's Encrypt certbot. | + | Need to make the configuration file for nginx to point to the correct files. Make sure to change the domain to the correct one, a generic placeholder wiki.domainname.tld is used for this example config. |
| - | sudo add-apt-repository ppa:certbot/certbot | + | sudo nano /etc/nginx/ |
| - | sudo apt update; sudo apt upgrade | + | Paste in the below configuration and save. |
| - | sudo apt install python-certbot-nginx | + | |
| - | sudo certbot --nginx certonly | + | |
| - | Cert and Key locations: | + | < |
| - | / | + | server { |
| - | /etc/letsencrypt/live/sub.domainname.tld/ | + | listen 80; |
| + | listen 443 ssl; | ||
| + | server_name wiki.domainname.tld; | ||
| + | | ||
| - | ------------- | + | access_log |
| - | source: https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx | + | error_log |
| - | ==== Renewing Certificate ==== | + | #ssl on; |
| - | sudo certbot renew | + | # |
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| - | ===== Configure nginx ===== | + | #add_header Content-Security-Policy " |
| - | Need to make the configuration file for nginx to point to the correct files. Make sure to change the domain to the correct one, a generic placeholder wiki.domainname.tld is used for this example config. | + | #add_header X-XSS-Protection "1; mode=block"; |
| - | sudo vim /etc/ | + | |
| - | Paste in the below configuration and save. | + | index index.html index.php doku.php; |
| + | |||
| + | | ||
| + | try_files $uri $uri/ @dokuwiki; | ||
| + | } | ||
| + | location @dokuwiki { | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/(.*) / | ||
| + | } | ||
| - | server | + | location ~ / |
| + | deny all; | ||
| + | } | ||
| + | |||
| + | location ~* \.(css|js|gif|jpe? | ||
| + | expires 1M; | ||
| + | add_header Pragma public; | ||
| + | add_header Cache-Control " | ||
| + | } | ||
| + | |||
| + | location ~ \.php$ { | ||
| + | fastcgi_split_path_info ^(.+\.php)(/ | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_index index.php; | ||
| + | include fastcgi_params; | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | fastcgi_intercept_errors off; | ||
| + | fastcgi_buffer_size 16k; | ||
| + | fastcgi_buffers 4 16k; | ||
| + | } | ||
| + | |||
| + | location ~ /\.ht { | ||
| + | deny all; | ||
| + | } | ||
| + | } | ||
| | | ||
| - | listen 443 ssl; | ||
| - | | ||
| - | root / | ||
| | | ||
| - | access_log / | + | #server { |
| - | | + | # |
| - | + | # | |
| - | ssl on; | + | # |
| - | | + | # |
| - | | + | #} |
| - | | + | </ |
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | add_header Content-Security-Policy " | + | |
| - | add_header X-XSS-Protection "1; mode=block"; | + | |
| - | + | ||
| - | index index.html index.php doku.php; | + | |
| - | + | ||
| - | location / { | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | location @dokuwiki { | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | location ~ / | + | |
| - | deny all; | + | |
| - | } | + | |
| - | + | ||
| - | location ~* \.(css|js|gif|jpe? | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | location ~ \.php$ { | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | location ~ /\.ht { | + | |
| - | deny all; | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| Here we are going to change the permissions on the web root files so that the web server can use and modify them. | Here we are going to change the permissions on the web root files so that the web server can use and modify them. | ||
| Line 110: | Line 94: | ||
| Start nginx and php-fpm, and enable php-fpm to start at boot. | Start nginx and php-fpm, and enable php-fpm to start at boot. | ||
| - | sudo systemctl start nginx php7.0-fpm | + | sudo systemctl start nginx php8.1-fpm |
| - | sudo systemctl enable | + | sudo systemctl enable |
| Line 118: | Line 102: | ||
| From there you can configure everything for the initial setup of DokuWiki. | From there you can configure everything for the initial setup of DokuWiki. | ||
| - | |||
| - | ==== Removing the Glow ==== | ||
| - | Make userstyle.css in /conf | ||
| - | sudo vim / | ||
| - | |||
| - | Copy the following | ||
| - | .dokuwiki div.page { | ||
| - | box-shadow: | ||
| - | } | ||
| - | .dokuwiki .pageId span { | ||
| - | box-shadow: | ||
| - | } | ||
| - | pre { | ||
| - | box-shadow: | ||
| - | } | ||
| - | |||
webapps/dokuwiki.1624034180.txt.gz · Last modified: 2021/06/18 16:36 by 127.0.0.1