webapps:dokuwiki
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| webapps:dokuwiki [2023/11/29 10:53] – lucid | 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 ===== | ||
| 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-stable.tgz" |
| - | | + | sudo mv /var/www/dokuwiki* |
| - | + | ||
| - | ===== Let's Encrypt ===== | + | |
| - | For SSL use the EFF's PPA for the Let's Encrypt certbot. | + | |
| - | sudo add-apt-repository ppa:certbot/certbot | + | |
| - | sudo apt update; sudo apt upgrade | + | |
| - | sudo apt install python3-certbot-nginx | + | |
| - | sudo certbot --nginx certonly | + | |
| - | + | ||
| - | Cert and Key locations: | + | |
| - | | + | |
| - | / | + | |
| - | + | ||
| - | ------------- | + | |
| - | source: https:// | + | |
| - | + | ||
| - | ==== Renewing Certificate ==== | + | |
| - | sudo certbot renew | + | |
| ===== Configure nginx ===== | ===== Configure nginx ===== | ||
| Line 37: | Line 20: | ||
| Paste in the below configuration and save. | Paste in the below configuration and save. | ||
| - | | + | < |
| + | server { | ||
| + | listen 80; | ||
| + | listen 443 ssl; | ||
| + | server_name wiki.domainname.tld; | ||
| + | root / | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | |||
| + | #ssl on; | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | #add_header Content-Security-Policy " | ||
| + | #add_header X-XSS-Protection "1; mode=block"; | ||
| + | |||
| + | index index.html index.php doku.php; | ||
| + | |||
| + | location / { | ||
| + | try_files $uri $uri/ @dokuwiki; | ||
| + | } | ||
| + | |||
| + | location @dokuwiki { | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/(.*) / | ||
| + | } | ||
| + | |||
| + | 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 109: | 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.4-fpm | + | sudo systemctl start nginx php8.1-fpm |
| - | sudo systemctl enable | + | sudo systemctl enable |
| Line 117: | 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.1701255215.txt.gz · Last modified: 2023/11/29 10:53 by lucid