User Tools

Site Tools


servers:linux: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:linux:nginx:dokuwiki [2026/01/01 02:46] – Ubuntu -> oS TW (WIP) Sean Rhoneservers:linux:nginx:dokuwiki [2026/01/01 03:20] (current) Sean Rhone
Line 29: Line 29:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -e '/etc/php/8.4/fpm/pool.d/wiki.conf' && sudo systemctl restart 'php8.4-fpm'+  sudo -e '/etc/php8/fpm/php-fpm.d/wiki.conf' && sudo systemctl restart 'php-fpm'
  
 <code> <code>
Line 39: Line 39:
  
 ; Socket ; Socket
-listen = "/run/php/wiki.sock"+listen = "/run/php-fpm/wiki.sock"
 listen.owner = "wwwrun" listen.owner = "wwwrun"
 listen.group = "www" listen.group = "www"
Line 52: Line 52:
 php_value[log_errors] = "0" php_value[log_errors] = "0"
 php_value[error_reporting] = "~E_ALL" php_value[error_reporting] = "~E_ALL"
 +
 +; openSUSE php.ini Defaults
 +php_value[session.save_path] = "/var/lib/php8/sessions"
  
 ; General ; General
Line 60: Line 63:
 ===== FastCGI ===== ===== FastCGI =====
  
-  sudo -e '/etc/nginx/snippets/wiki.conf'+  sudo -e '/etc/nginx/default.d/wiki.conf'
  
 <code> <code>
Line 73: Line 76:
  fastcgi_param 'HTTPS' 'on';  fastcgi_param 'HTTPS' 'on';
  
- fastcgi_pass 'unix:/run/php/wiki.sock';+ fastcgi_pass 'unix:/run/php-fpm/wiki.sock';
  
 } }
Line 81: Line 84:
 ===== Server Block ====== ===== Server Block ======
  
-  sudo -e '/etc/nginx/sites-available/wiki.conf'+  sudo -e '/etc/nginx/vhosts.d/wiki.conf' && sudo systemctl reload 'nginx'
  
 <code> <code>
Line 92: Line 95:
  index 'doku.php';  index 'doku.php';
  
- include '/etc/nginx/snippets/wiki.conf'; + include '/etc/nginx/default.d/wiki.conf'; 
- include '/etc/nginx/snippets/headers.conf';+ include '/etc/nginx/default.d/headers.conf';
  
  client_max_body_size '10M';  client_max_body_size '10M';
Line 99: Line 102:
  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';
  
-# access_log '/srv/log/nginx/wiki-access.log'; +# access_log '/var/log/nginx/wiki-access.log'; 
-# error_log '/srv/log/nginx/wiki-error.log';+# error_log '/var/log/nginx/wiki-error.log';
  
 # location = '/install.php' { # location = '/install.php' {
Line 128: Line 131:
  
 # End</code> # End</code>
- 
-  sudo ln -s -f '/etc/nginx/sites-available/wiki.conf' '/etc/nginx/sites-enabled/wiki.conf' && sudo systemctl reload 'nginx' 
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 136: Line 137:
  
 ====== Settings ====== ====== Settings ======
- 
-===== Plugins ===== 
- 
-  * https://www.dokuwiki.org/plugin:searchindex 
  
 ===== Template Style Settings ===== ===== Template Style Settings =====
Line 152: Line 149:
   * Do after initial setup   * Do after initial setup
  
-  sudo -e '/etc/nginx/sites-available/wiki.conf' && sudo ln -s -f '/etc/nginx/sites-available/wiki.conf' '/etc/nginx/sites-enabled/wiki.conf' && sudo systemctl reload 'nginx'+  sudo -e '/etc/nginx/vhosts.d/wiki.conf' && sudo systemctl reload 'nginx'
  
 ===== URL Rewrite ===== ===== URL Rewrite =====
Line 164: Line 161:
   * This prevents -- from becoming a – (long hyphen), which breaks some command's syntax   * This prevents -- from becoming a – (long hyphen), which breaks some command's syntax
  
-  echo '--      --' | sudo -u 'wwwrun' tee '/srv/www/wiki/conf/entities.local.conf' > '/dev/null'+  echo '--      --' | sudo tee '/srv/www/wiki/conf/entities.local.conf' > '/dev/null' && sudo chown 'wwwrun':'www' '/srv/www/wiki/conf/entities.local.conf'
  
 ====== Scripts ====== ====== Scripts ======
Line 198: Line 195:
 # End</code> # End</code>
  
-  sudo -u 'wwwrun' '/etc/nginx/scripts/wiki/git-fix.sh'+==== Execute ==== 
 + 
 +  sudo su 'wwwrun' -s '/bin/bash' 
 + 
 +  '/etc/nginx/scripts/wiki/git-fix.sh' 
 + 
 +  exit
  
 ====== Services ====== ====== Services ======
Line 248: Line 251:
  
 ===== Backup ===== ===== Backup =====
- 
-  * TODO: NAS mount 
  
 ==== Service ==== ==== Service ====
Line 393: Line 394:
  
   git -C '/srv/www/wiki' fsck --full --strict   git -C '/srv/www/wiki' fsck --full --strict
 +
 +  exit
 +
 +===== Indexer =====
 +
 +  sudo su 'wwwrun' -s '/bin/bash'
 +
 +  cd '/srv/www/wiki' && '/usr/bin/php' '/srv/www/wiki/bin/indexer.php' --clear
  
   exit   exit
/usr/local/www/wiki/data/attic/servers/linux/nginx/dokuwiki.1767253603.txt.gz · Last modified: by Sean Rhone