sysadmin:wiki
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sysadmin:wiki [2025/11/19 15:04] – mlivolsi | sysadmin:wiki [2025/11/19 15:26] (current) – mlivolsi | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| * Don't follow verbatim ChatGPT or Gemini, as they will make you nuts if you listen to them. | * Don't follow verbatim ChatGPT or Gemini, as they will make you nuts if you listen to them. | ||
| - | Step 1: sudo to root | + | **Steps** |
| - | Step 2: cd /var/www and make the directory wiki | + | |
| - | Step 3: cd wiki | + | |
| - | Step 4: get the latest copy: curl -o doku.tgz https:// | + | |
| - | Step 5: Extract the wiki: tar -xzvf doku.tgz | + | |
| - | Step 6: Rename the resulting directory: mv dokuwiki-2025-05-14b dokuwiki | + | |
| - | Step 7: change ownership to www-data: | + | |
| - | Step 8: cd / | + | |
| - | Step 9: Create a file called wiki.conf and make sure it looks similar to the following: | + | |
| - | '' | + | * Step 1: sudo to root |
| + | * Step 2: cd /var/www and make the directory wiki | ||
| + | * Step 3: cd wiki | ||
| + | * Step 4: get the latest copy: curl -o doku.tgz https:// | ||
| + | * Step 5: Extract the wiki: tar -xzvf doku.tgz | ||
| + | * Step 6: Rename the resulting directory: mv dokuwiki-2025-05-14b dokuwiki | ||
| + | * Step 7: change ownership to www-data: | ||
| + | * Step 8: cd / | ||
| + | * Step 9: Create a file called wiki.conf and make sure it looks similar to the following: | ||
| + | < | ||
| + | | ||
| ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
| ServerName | ServerName | ||
| Line 58: | Line 60: | ||
| ErrorLog ${APACHE_LOG_DIR}/ | ErrorLog ${APACHE_LOG_DIR}/ | ||
| CustomLog ${APACHE_LOG_DIR}/ | CustomLog ${APACHE_LOG_DIR}/ | ||
| - | </ | + | </ |
| + | </ | ||
| + | |||
| + | * Step 10 - Make configuration visible: a2ensite wiki | ||
| + | * Step 11 - Edit the docu-wiki configuration: | ||
| + | * Step 12 - Make the following changes: | ||
| + | |||
| + | < | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | $conf[' | ||
| + | </ | ||
| + | |||
| + | * Step 13 - enable re-write if not already enabled: a2enmod rewrite | ||
| + | * Step 14 - Enable the configuration: | ||
| + | * Step 15 - Make sure to configure your site with the username, etc.. via your browser | ||
| + | |||
| + | http://< | ||
| + | |||
| + | * Step 16 - Login to your nginx site | ||
| + | * Step 17 - cd / | ||
| + | * Step 18 - Before this block, add the subsequent block in this doc, above it !!! | ||
| + | |||
| + | * ** >>> | ||
| + | |||
| + | < | ||
| + | # Static assets for WordPress | ||
| + | location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | ||
| + | expires max; | ||
| + | log_not_found off; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | My block | ||
| + | < | ||
| + | # ------------------------------- | ||
| + | # DokuWiki reverse proxy | ||
| + | # ------------------------------- | ||
| + | location ^~ /wiki/ { | ||
| + | proxy_pass http:// | ||
| + | proxy_set_header Host $host; | ||
| + | proxy_set_header X-Real-IP $remote_addr; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | |||
| + | # Important for DokuWiki | ||
| + | proxy_set_header X-Forwarded-Host $host; | ||
| + | proxy_set_header X-Forwarded-Port $server_port; | ||
| + | |||
| + | proxy_redirect off; | ||
| + | } | ||
| + | |||
| + | # Redirect /wiki (no trailing slash) | ||
| + | location = /wiki { | ||
| + | return 301 /wiki/; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | * Restart nginx: systemctl restart nginx | ||
| + | |||
| + | Afterwards, if you go to your site.. like " | ||
| + | |||
| + | |||
| + | **Notes** | ||
| + | |||
| + | | ||
sysadmin/wiki.1763564652.txt.gz · Last modified: by mlivolsi
