User Tools

Site Tools


servers: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 revisionBoth sides next revision
servers:nginx:dokuwiki [2019/06/28 21:29] Sean Rhoneservers:nginx:dokuwiki [2019/10/23 20:49] Sean Rhone
Line 7: Line 7:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[distros:fedora_server|Fedora Server]] +  * [[distros:ubuntu_server|Ubuntu Server]] 
-  * [[servers:nginx_php_php-fpm | nginx + PHP + PHP-FPM]] +  * [[servers:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] 
-  * [[servers:nginx:lets_encrypt | Let's Encrypt]]+  * [[servers:nginx:lets_encrypt|Let's Encrypt]]
  
 ====== Download Source ====== ====== Download Source ======
Line 15: Line 15:
 **** ****
  
-  sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/splitbrain/dokuwiki.git' '/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' '/var/www/wiki' && sudo chown -R 'www-data':'www-data' '/var/www/wiki' && sync
- +
-===== SELinux ===== +
- +
-  sudo semanage fcontext --deleteall "/var/www/wiki(/.*)?" +
- +
-  sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' "/var/www/wiki(/.*)?" +
- +
-  sudo restorecon -R -v '/var/www/wiki'+
  
 ====== nginx + PHP-FPM Configuration ====== ====== nginx + PHP-FPM Configuration ======
Line 29: Line 21:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -e '/etc/php-fpm.d/wiki.conf' && sudo systemctl restart 'php-fpm'+  sudo -e '/etc/php/7.2/fpm/pool.d/wiki.conf' && sudo systemctl restart 'php7.2-fpm'
  
 <code> <code>
 [wiki] [wiki]
-user = nginx +user = www-data 
-group = nginx+group = www-data
  
-listen = /run/php-fpm/wiki.sock +listen = /run/php/wiki.sock 
-listen.owner = nginx +listen.owner = www-data 
-listen.group = nginx+listen.group = www-data
 listen.allowed_clients = 127.0.0.1 listen.allowed_clients = 127.0.0.1
  
Line 56: Line 48:
 php_value[max_file_uploads] = "100" php_value[max_file_uploads] = "100"
  
-php_value[session.save_handler] = files +php_value[session.save_handler] = "files" 
-php_value[session.save_path] = /var/lib/php/session +php_value[session.save_path] = "/var/lib/php/session" 
-php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache +php_value[soap.wsdl_cache_dir] = "/var/lib/php/wsdlcache" 
-php_value[opcache.file_cache] = /var/lib/php/opcache</code>+php_value[opcache.file_cache] = "/var/lib/php/opcache"</code>
  
 ===== FastCGI ===== ===== FastCGI =====
  
-  sudo -e '/etc/nginx/default.d/wiki.conf'+  sudo -e '/etc/nginx/snippets/wiki.conf'
  
 <code> <code>
Line 75: Line 67:
     fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;     fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
     fastcgi_param PATH_INFO $fastcgi_path_info;     fastcgi_param PATH_INFO $fastcgi_path_info;
-    fastcgi_pass unix:/run/php-fpm/wiki.sock;+    fastcgi_pass unix:/run/php/wiki.sock;
 }</code> }</code>
  
 ===== Server Block ====== ===== Server Block ======
  
-  sudo -e '/etc/nginx/conf.d/wiki.conf'+  sudo -e '/etc/nginx/sites-available/wiki.conf'
  
 <code> <code>
Line 89: Line 81:
     index 'doku.php';     index 'doku.php';
  
-    include '/etc/nginx/default.d/wiki.conf'; +    include '/etc/nginx/snippets/wiki.conf'; 
-    include '/etc/nginx/default.d/headers.conf';+    include '/etc/nginx/snippets/headers.conf';
  
     client_max_body_size '10M';     client_max_body_size '10M';
Line 120: Line 112:
     }     }
 }</code> }</code>
 +
 +==== Enable =====
 +
 +****
 +
 +  sudo rm -f '/etc/nginx/sites-enabled/wiki.conf' && sudo ln -s '/etc/nginx/sites-available/wiki.conf' '/etc/nginx/sites-enabled/wiki.conf' && sudo systemctl reload 'nginx' && sync
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 138: Line 136:
   * Do after initial setup   * Do after initial setup
  
-  sudo -e '/etc/nginx/conf.d/wiki.conf' && sudo systemctl reload 'nginx'+  sudo -e '/etc/nginx/sites-available/wiki.conf' && sudo systemctl reload 'nginx'
  
 ===== URL Rewrite ===== ===== URL Rewrite =====
Line 149: Line 147:
   * 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'+  echo '--      --' | sudo tee '/var/www/wiki/conf/entities.local.conf' > '/dev/null' && sudo chown 'www-data':'www-data' '/var/www/wiki/conf/entities.local.conf'
  
 ====== Services ====== ====== Services ======
/var/www/wiki/data/pages/servers/nginx/dokuwiki.txt · Last modified: 2024/02/07 16:37 by Sean Rhone