User Tools

Site Tools


servers:bsd:nginx:dokuwiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:bsd:nginx:dokuwiki [2026/04/27 15:13] – [Updater] Sean Rhoneservers:bsd:nginx:dokuwiki [2026/08/08 00:05] (current) – [Prerequisites] Sean Rhone
Line 7: Line 7:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[bsd:server:freebsd_15.1|FreeBSD 15.1]]+  * [[bsd:server:vps:freebsd_15.1|FreeBSD 15.1]]
   * [[servers:bsd:freenginx_php_php-fpm|freenginx + PHP + PHP-FPM]]   * [[servers:bsd:freenginx_php_php-fpm|freenginx + PHP + PHP-FPM]]
   * [[servers:bsd:nginx:lets_encrypt|Certbot (Let's Encrypt)]]   * [[servers:bsd:nginx:lets_encrypt|Certbot (Let's Encrypt)]]
Line 54: Line 54:
  
 ; Logging ; Logging
-php_value[log_errors] = "Off"+php_value[log_errors] = "0"
 php_value[error_reporting] = "~E_ALL" php_value[error_reporting] = "~E_ALL"
-php_value[display_errors] = "Off+php_value[display_errors] = "0
-php_value[display_startup_errors] = "Off+php_value[display_startup_errors] = "0
-php_value[html_errors] = "Off"+php_value[html_errors] = "0"
  
 ; General ; General
Line 83: Line 83:
  fastcgi_pass '127.0.0.1:9002';  fastcgi_pass '127.0.0.1:9002';
 } }
 +
 +# End</code>
 +
 +===== Deny Directives =====
 +
 +  * https://www.dokuwiki.org/security#web_access_security
 +
 +  su -
 +
 +  ee '/usr/local/etc/freenginx/default.d/dokuwiki-deny.conf'
 +
 +<code>
 +# Web Access Security
 + location = '/install.php' {
 +  deny 'all';
 + }
 +
 + location '~' '/(conf|bin|inc)/' {
 +  deny 'all';
 + }
 +
 + location '~' '/data/' {
 +  internal;
 + }
  
 # End</code> # End</code>
Line 102: Line 126:
  include '/usr/local/etc/freenginx/default.d/wiki.conf';  include '/usr/local/etc/freenginx/default.d/wiki.conf';
  include '/usr/local/etc/freenginx/default.d/headers.conf';  include '/usr/local/etc/freenginx/default.d/headers.conf';
 +
 +# include '/usr/local/etc/freenginx/default.d/dokuwiki-deny.conf';
  
  add_header 'Content-Security-Policy' "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:" 'always';  add_header 'Content-Security-Policy' "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:" 'always';
Line 107: Line 133:
 # access_log '/var/log/nginx/wiki-access.log'; # access_log '/var/log/nginx/wiki-access.log';
 # error_log '/var/log/nginx/wiki-error.log'; # error_log '/var/log/nginx/wiki-error.log';
- 
-# location = '/install.php' { 
-#  deny 'all'; 
-# } 
- 
-# location '~' '/(conf|bin|inc)/' { 
-#  deny 'all'; 
-# } 
- 
-# location '~' '/data/' { 
-#  internal; 
-# } 
  
  location '/' {  location '/' {
Line 146: Line 160:
   * The width of the full site: ''85%''   * The width of the full site: ''85%''
  
-===== nginx Server Block Deny Directives =====+===== nginx Deny Directive =====
  
-  * Uncomment commented sections (except logs)+  * Uncomment ''dokuwiki-deny.conf'' include
   * Do after initial setup   * Do after initial setup
  
Line 193: Line 207:
  
 ===== Backup ===== ===== Backup =====
 +
 +  * [[bsd:notes:ufs_format|UFS NAS]]
  
   mkdir -p ~/'backups' ~/'.local/scripts/www/wiki' && ee ~/'.local/scripts/www/wiki/backup.sh' && chmod +x ~/'.local/scripts/www/wiki/backup.sh'   mkdir -p ~/'backups' ~/'.local/scripts/www/wiki' && ee ~/'.local/scripts/www/wiki/backup.sh' && chmod +x ~/'.local/scripts/www/wiki/backup.sh'
Line 201: Line 217:
 cd '/tmp' cd '/tmp'
  
-'/usr/bin/tar' -czf '/home/espionage724/backups/dokuwiki-files-auto-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www/wiki' 'data/pages' 'data/meta' 'data/media' 'data/media_meta' 'data/attic' 'data/media_attic' 'conf'+'/usr/bin/tar' -czf '/mnt/NAS1/Servers/Scheduled Backups/dokuwiki-files-auto-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www/wiki' 'data/pages' 'data/meta' 'data/media' 'data/media_meta' 'data/attic' 'data/media_attic' 'conf' 
 + 
 +#'/usr/bin/tar' -czf '/home/espionage724/backups/dokuwiki-files-auto-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www/wiki' 'data/pages' 'data/meta' 'data/media' 'data/media_meta' 'data/attic' 'data/media_attic' 'conf'
  
 '/bin/sync' '/bin/sync'
Line 312: Line 330:
  
 ===== Folder ===== ===== Folder =====
- 
-**** 
  
   su 'root' -c "tar -czf '/home/'$USER'/dokuwiki-files-manual-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www/wiki' 'data/pages' 'data/meta' 'data/media' 'data/media_meta' 'data/attic' 'data/media_attic' 'conf'"   su 'root' -c "tar -czf '/home/'$USER'/dokuwiki-files-manual-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www/wiki' 'data/pages' 'data/meta' 'data/media' 'data/media_meta' 'data/attic' 'data/media_attic' 'conf'"
  
 ===== scp ===== ===== scp =====
- 
-**** 
  
   scp espionage724@192.168.1.152:~/'dokuwiki-files-'*'.tar.gz' ~/'Downloads'   scp espionage724@192.168.1.152:~/'dokuwiki-files-'*'.tar.gz' ~/'Downloads'
Line 326: Line 340:
  
 ===== scp ===== ===== scp =====
- 
-**** 
  
   scp ~/'Downloads/dokuwiki-files-'*'.tar.gz' espionage724@192.168.1.152:~   scp ~/'Downloads/dokuwiki-files-'*'.tar.gz' espionage724@192.168.1.152:~
/usr/local/www/wiki/data/attic/servers/bsd/nginx/dokuwiki.1777317232.txt.gz · Last modified: by Sean Rhone