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

Next revision
Previous revision
servers:linux:nginx:dokuwiki [2024/08/13 22:15] – created Sean Rhoneservers:linux:nginx:dokuwiki [2025/04/25 01:04] (current) – [PHP-FPM Socket] Sean Rhone
Line 1: Line 1:
 ====== Information ====== ====== Information ======
  
-  * DokuWiki ((https://www.dokuwiki.org)) ((https://github.com/splitbrain/dokuwiki))+  * DokuWiki ((https://www.dokuwiki.org))
   * [[Information:Realm of Espionage]]   * [[Information:Realm of Espionage]]
   * https://wiki.realmofespionage.xyz ((you are here :p))   * https://wiki.realmofespionage.xyz ((you are here :p))
Line 7: Line 7:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[distros:fedora_server|Fedora Server]] +  * [[linux:distros:server:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]] 
-  * [[servers:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] +  * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] 
-  * [[servers:nginx:lets_encrypt|Let's Encrypt]]+  * [[servers;linux;nginx;lets_encrypt|Certbot (Let's Encrypt)]]
  
-====== TODO ======+====== TODOs ======
  
   * https://www.dokuwiki.org/cli?s%5B%5D=wantedpages.php   * https://www.dokuwiki.org/cli?s%5B%5D=wantedpages.php
Line 17: Line 17:
 ====== Dependencies ====== ====== Dependencies ======
  
-  * PHP Modulesgd sodium zip zlib xml+  * https://www.dokuwiki.org/requirements 
 +  * https://www.dokuwiki.org/install:php 
 +  * https://github.com/dokuwiki/dokuwiki/blob/master/composer.json
  
-  sudo dnf install php-gd php-sodium php-pecl-zip php-xml+  sudo zypper install php8-bz2 php8-gd php8-intl php8-mbstring php8-sodium php8-zlib
  
 ====== Download Source ====== ====== Download Source ======
  
-****+  https://github.com/dokuwiki/dokuwiki/commits/master/
  
-  sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/splitbrain/dokuwiki.git' '/var/www/wiki' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/wiki(/.*)?' && sudo restorecon -F -I -R '/var/www/wiki' && sudo chown -R 'nginx':'nginx' '/var/www/wiki' && sync+  sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/splitbrain/dokuwiki.git' '/srv/www/wiki' && sudo chown -R 'wwwrun' '/srv/www/wiki' 
 + 
 +  sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/srv/www/wiki(/.*)?' && sudo restorecon -F -I -R '/srv/www/wiki'
  
 ====== nginx + PHP-FPM Configuration ====== ====== nginx + PHP-FPM Configuration ======
Line 31: Line 35:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -e '/etc/php-fpm.d/wiki.conf' && sudo systemctl restart 'php-fpm'+  sudo -e '/etc/php8/fpm/php-fpm.d/wiki.conf' && sudo systemctl restart 'php-fpm'
  
 <code> <code>
 +; php-fpm.d/wiki.conf
 +
 [wiki] [wiki]
  
 ; User/Group ; User/Group
-user = nginx +user = wwwrun 
-group = nginx+group = www
  
 ; Socket ; Socket
 listen = /run/php-fpm/wiki.sock listen = /run/php-fpm/wiki.sock
-listen.acl_users nginx +listen.owner wwwrun 
-listen.allowed_clients 127.0.0.1+listen.group www 
 +listen.mode = 0666
  
 ; Process Management ; Process Management
Line 50: Line 57:
 pm.process_idle_timeout = 30 pm.process_idle_timeout = 30
  
-Fedora php.ini Defaults +openSUSE php.ini Defaults 
-php_value[session.save_handler] = "files" +php_value[session.save_path] = "/var/lib/php8/sessions"
-php_value[session.save_path] = "/var/lib/php/session"+
  
 ; General ; General
 php_value[date.timezone] = "America/New_York" php_value[date.timezone] = "America/New_York"
-;php_value[max_execution_time] = "200" 
-;php_value[memory_limit] = "512M" 
-;php_value[post_max_size] = "10M" 
-;php_value[upload_max_filesize] = "10M" 
-;php_value[max_file_uploads] = "100" 
  
 ; End</code> ; End</code>
Line 69: Line 70:
  
 <code> <code>
 +# nginx/default.d/wiki.conf
 # PHP-FPM # PHP-FPM
 +
 location ~ \.(php|phar)(/.*)?$ { location ~ \.(php|phar)(/.*)?$ {
     fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;     fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;
Line 79: Line 82:
     fastcgi_param HTTPS on;     fastcgi_param HTTPS on;
     fastcgi_pass unix:/run/php-fpm/wiki.sock;     fastcgi_pass unix:/run/php-fpm/wiki.sock;
-}</code>+} 
 + 
 +# End</code>
  
 ===== Server Block ====== ===== Server Block ======
  
-  sudo -e '/etc/nginx/vhosts.d/wiki.conf' && sudo systemctl reload 'nginx' && sync+  sudo -e '/etc/nginx/vhosts.d/wiki.conf' && sudo systemctl reload 'nginx'
  
 <code> <code>
 +# nginx/vhosts.d/wiki.conf
 +
 server { server {
     listen '443' 'ssl';     listen '443' 'ssl';
     http2 'on';     http2 'on';
     server_name 'wiki.realmofespionage.xyz';     server_name 'wiki.realmofespionage.xyz';
-    root '/var/www/wiki';+    root '/srv/www/wiki';
     index 'doku.php';     index 'doku.php';
  
Line 123: Line 130:
         rewrite ^/(.*) /doku.php?id=$1&$args last;         rewrite ^/(.*) /doku.php?id=$1&$args last;
     }     }
-}</code>+} 
 + 
 +# End</code>
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 160: Line 169:
   * 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 tee '/var/www/wiki/conf/entities.local.conf' > '/dev/null' && sudo chown 'nginx':'nginx' '/var/www/wiki/conf/entities.local.conf' && sync+  echo '--      --' | sudo tee '/var/www/wiki/conf/entities.local.conf' > '/dev/null' && sudo chown 'nginx':'nginx' '/var/www/wiki/conf/entities.local.conf'
  
 ====== Services ====== ====== Services ======
Line 252: Line 261:
 ==== Service ==== ==== Service ====
  
-  * The extra ''ExecStart''s are additional backup locations that expect [[servers:vsftpd|vsftpd]]+  * The extra ''ExecStart''s are additional backup locations that expect [[servers:linux:vsftpd#fstab1|vsftpd]]
   * TODO: Remove additional backup locations and put it on a system-wide script direct from the ''~/backups'' folder   * TODO: Remove additional backup locations and put it on a system-wide script direct from the ''~/backups'' folder
  
/srv/www/wiki/data/attic/servers/linux/nginx/dokuwiki.1723601756.txt.gz · Last modified: by Sean Rhone