docs: clearer README, more user-friendly

This commit is contained in:
2025-11-27 16:16:48 +01:00
parent d005c77dbe
commit 6319831623

104
README.md
View File

@@ -1,4 +1,4 @@
# DokuWiki for Ubuntu 24.04 Server
# DokuWiki on Ubuntu 24.04
[![OS](https://img.shields.io/badge/ubuntu-24.04-E95420)](#)
[![Shell](https://img.shields.io/badge/shell-bash-121011)](#)
[![WebServer](https://img.shields.io/badge/server-nginx-009639)](#)
@@ -6,92 +6,106 @@
[![App](https://img.shields.io/badge/app-dokuwiki-0098D4)](#)
[![License](https://img.shields.io/badge/License-MIT-green)](./LICENSE)
Automated Bash installer for deploying the **latest stable release of DokuWiki** on Ubuntu 24.04 Server.
Automated Bash installer for the latest stable **DokuWiki on Ubuntu 24.04**, configured for Nginx + PHP-FPM.
This is a **production-focused installer**, not a demo.
It assumes that Nginx and PHP-FPM are already installed and running.
This deploys a **production-ready wiki**, not a classroom demo.
Clean config, isolated site directory, post-install hardening included.
---
## Related Installers
## Requirements
If you dont have the required components, you can use this compatible installer:
You must already have:
- [Nginx + PHP-FPM Installer](https://git.x-files.dk/webserver/nginx-ubuntu)
✔ Nginx installed
✔ PHP-FPM running
If not, start here:
https://git.x-files.dk/webserver/nginx-ubuntu
---
### Download the Script
Clone the repository to your server:
## 1. Download
```
git clone https://git.x-files.dk/webapps/dokuwiki-ubuntu.git
```
```
cd dokuwiki-ubuntu
```
### Usage
Run the script and provide your desired domain name as an argument:
---
## 2. Install
```
sudo ./dokuwikiinstall <domain name>
sudo ./dokuwikiinstall <domain>
```
### Example
Example:
```
sudo ./dokuwikiinstall wiki.example.com
```
### Configuration
When the installation completes, visit:
Generated paths:
| File/Dir | Purpose |
|---|---|
| `/var/www/<domain>` | DokuWiki installation |
| `/etc/nginx/conf.d/<domain>.conf` | Virtualhost |
| `/tmp/dokuwiki-postinstall` | Hardening script |
---
## 3. Web Setup
Visit:
```
http://<domain>/install.php
```
and complete the initial DokuWiki setup through the web interface.
Create admin + finish setup.
---
### Post-install
After completing the web-based installation, run the post-install script to apply security and hardening settings:
## 4. PostInstall Hardening
```
sudo /tmp/dokuwiki-postinstall
```
---
This script:
### Nginx Integration
The generated DokuWiki configuration file listens on port 80.
To enable HTTPS (port 443), use the example provided [here](https://git.x-files.dk/webserver/nginx-snippets/src/branch/main/hostfiles/dokuwiki.443.conf)
> **NOTE**
> The file also includes optional caching directives (commented out by default).
> You can enable them to improve load times and performance if needed.
> The lines you are looking for are at the bottom of the generated config file and look like this:
> ```
> ##### Cache js css static content and open files start #####################
> # include /etc/nginx/nginx-snippets/cache-open-files.conf;
> # include /etc/nginx/nginx-snippets/cache-statics.conf;
> # include /etc/nginx/nginx-snippets/cache-js-css.conf;
> ##### Cache js css static content and open files stop ######################
> ```
✔ Removes installer
✔ Secures permissions
✔ Applies sane defaults
✔ Makes the wiki productionsafe
---
### Troubleshooting
## HTTPS
**Nginx fails to restart**
Run `nginx -t` and review any syntax errors reported in `/etc/nginx/conf.d/<domain>.conf`.
Enable TLS with:
**PHP version mismatch**
The script automatically detects your installed PHP version,
but ensure that the PHP-FPM service (e.g., `php8.3-fpm`) is active.
https://git.x-files.dk/webserver/nginx-snippets/src/branch/main/hostfiles/dokuwiki.443.conf
Optional caching (disabled by default):
```
# include /etc/nginx/nginx-snippets/cache-open-files.conf;
# include /etc/nginx/nginx-snippets/cache-statics.conf;
# include /etc/nginx/nginx-snippets/cache-js-css.conf;
```
---
## Troubleshooting
| Issue | Cause | Fix |
|---|---|---|
| Nginx restart fails | Config syntax | `nginx -t` |
| PHP errors | Wrong FPM version | `systemctl status php8.3-fpm` |
| install.php still present | Postinstall not run | `sudo /tmp/dokuwiki-postinstall` |
---