servers:nginx:dokuwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
servers:nginx:dokuwiki [2020/04/24 10:09] – 20.04 Sean Rhone | servers:nginx:dokuwiki [2020/12/19 03:40] – Sean Rhone | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:ubuntu_server|Ubuntu Server]] ((Last tested on 20.04)) | + | * [[distros:opensuse_tumbleweed_server|openSUSE Tumbleweed]] |
* [[servers: | * [[servers: | ||
* [[servers: | * [[servers: | ||
Line 15: | Line 15: | ||
**** | **** | ||
- | sudo git clone --branch ' | + | sudo git clone --branch ' |
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 21: | Line 21: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/etc/php/7.4/fpm/pool.d/ | + | sudo -e '/etc/php7/fpm/php-fpm.d/ |
< | < | ||
[wiki] | [wiki] | ||
- | user = www-data | + | user = wwwrun |
- | group = www-data | + | group = www |
- | listen = / | + | listen = 127.0.0.1:9001 |
- | listen.owner = www-data | + | listen.owner = wwwrun |
- | listen.group = www-data | + | listen.group = www |
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
- | pm = dynamic | + | pm = ondemand |
- | pm.max_children = 8 | + | pm.max_children = 4 |
- | pm.start_servers | + | pm.process_idle_timeout |
- | pm.min_spare_servers = 2 | + | |
- | pm.max_spare_servers = 4 | + | |
- | php_value[date.timezone] = " | + | php_value[date.timezone] = " |
- | php_value[upload_tmp_dir] = "/ | + | |
- | + | ||
- | php_value[max_execution_time] = " | + | |
- | php_value[memory_limit] = " | + | |
- | php_value[post_max_size] = " | + | |
- | php_value[upload_max_filesize] = " | + | |
- | php_value[max_file_uploads] = " | + | |
- | + | ||
- | php_value[session.save_handler] = " | + | |
- | php_value[session.save_path] = "/ | + | |
- | php_value[soap.wsdl_cache_dir] = "/ | + | |
- | php_value[opcache.file_cache] = "/ | + | |
===== FastCGI ===== | ===== FastCGI ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 67: | Line 53: | ||
fastcgi_param SCRIPT_FILENAME | fastcgi_param SCRIPT_FILENAME | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
- | fastcgi_pass | + | fastcgi_pass |
}</ | }</ | ||
===== Server Block ====== | ===== Server Block ====== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 78: | Line 64: | ||
listen ' | listen ' | ||
server_name ' | server_name ' | ||
- | root '/var/ | + | root '/srv/ |
index ' | index ' | ||
- | include '/etc/nginx/snippets/ | + | include ' |
- | include '/etc/nginx/snippets/ | + | include ' |
client_max_body_size ' | client_max_body_size ' | ||
Line 112: | Line 98: | ||
} | } | ||
}</ | }</ | ||
- | |||
- | ==== Enable ===== | ||
- | |||
- | **** | ||
- | |||
- | sudo rm -f '/ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
Line 136: | Line 116: | ||
* Do after initial setup | * Do after initial setup | ||
- | sudo -e '/ | + | sudo -e '/ |
===== URL Rewrite ===== | ===== URL Rewrite ===== | ||
Line 147: | Line 127: | ||
* This prevents -- from becoming a – (long hyphen), which breaks some command' | * This prevents -- from becoming a – (long hyphen), which breaks some command' | ||
- | echo ' | + | echo ' |
====== Services ====== | ====== Services ====== | ||
Line 159: | Line 139: | ||
< | < | ||
[Service] | [Service] | ||
- | User=www-data | + | User=wwwrun |
- | Group=www-data | + | Group=www |
Type=oneshot | Type=oneshot | ||
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStartPost='/ | + | ExecStartPost=' |
==== Timer ==== | ==== Timer ==== | ||
Line 196: | Line 176: | ||
< | < | ||
[Service] | [Service] | ||
- | User=www-data | + | User=wwwrun |
- | Group=www-data | + | Group=www |
Type=oneshot | Type=oneshot | ||
- | WorkingDirectory=/ | + | WorkingDirectory=/ |
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
- | # | + | # |
- | ExecStart='/ | + | ExecStart=' |
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStartPost='/ | + | ExecStartPost=' |
==== Timer ==== | ==== Timer ==== | ||
Line 235: | Line 215: | ||
[Service] | [Service] | ||
Type=oneshot | Type=oneshot | ||
- | WorkingDirectory=/ | + | WorkingDirectory=/ |
- | ExecStart='/ | + | ExecStart=' |
- | ExecStartPost='/ | + | ExecStartPost=' |
==== Timer ==== | ==== Timer ==== | ||
Line 266: | Line 246: | ||
**** | **** | ||
- | cd '/var/ | + | cd '/srv/ |
===== Client ===== | ===== Client ===== | ||
Line 304: | Line 284: | ||
**** | **** | ||
- | ls ~/' | + | ls ~/' |
==== Restore Folders ==== | ==== Restore Folders ==== | ||
Line 310: | Line 290: | ||
**** | **** | ||
- | cd '/var/ | + | cd '/srv/ |
==== Start nginx ==== | ==== Start nginx ==== |
/var/www/wiki/data/pages/servers/nginx/dokuwiki.txt · Last modified: 2024/02/07 16:37 by Sean Rhone