servers:bsd:nginx:dokuwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:bsd:nginx:dokuwiki [2025/05/16 12:23] – Sean Rhone | servers:bsd:nginx:dokuwiki [2025/05/24 05:34] (current) – Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Information ====== | ||
+ | |||
+ | * DokuWiki ((https:// | ||
+ | * [[Information: | ||
+ | * https:// | ||
+ | |||
+ | ===== Prerequisites ===== | ||
+ | |||
+ | * [[bsd: | ||
+ | * [[servers: | ||
+ | * [[servers: | ||
+ | |||
+ | ====== Dependencies ====== | ||
+ | |||
+ | su - | ||
+ | |||
+ | pkg install git-lite php84-session php84-bz2 php84-filter php84-gd php84-intl php84-mbstring php84-xml php84-zlib | ||
+ | |||
+ | ====== Download Source ====== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | su - | ||
+ | |||
+ | git clone --branch ' | ||
+ | |||
+ | ====== nginx + PHP-FPM Configuration ====== | ||
+ | |||
+ | ===== PHP-FPM Socket ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | ee '/ | ||
+ | |||
+ | < | ||
+ | [wiki] | ||
+ | |||
+ | ; User/Group | ||
+ | user = www | ||
+ | group = www | ||
+ | |||
+ | ; Socket | ||
+ | listen = 127.0.0.1: | ||
+ | listen.allowed_clients = 127.0.0.1 | ||
+ | |||
+ | ; Process Management | ||
+ | pm = ondemand | ||
+ | pm.max_children = 4 | ||
+ | pm.process_idle_timeout = 30 | ||
+ | |||
+ | ; General | ||
+ | php_value[date.timezone] = " | ||
+ | |||
+ | ; End</ | ||
+ | |||
+ | ===== FastCGI ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | ee '/ | ||
+ | |||
+ | < | ||
+ | # PHP-FPM | ||
+ | location ~ \.(php|phar)(/ | ||
+ | fastcgi_split_path_info ^(.+\.(?: | ||
+ | fastcgi_intercept_errors on; | ||
+ | fastcgi_index doku.php; | ||
+ | include fastcgi_params; | ||
+ | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
+ | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
+ | fastcgi_param HTTPS on; | ||
+ | fastcgi_pass 127.0.0.1: | ||
+ | } | ||
+ | |||
+ | # End</ | ||
+ | |||
+ | ===== Server Block ====== | ||
+ | |||
+ | su - | ||
+ | |||
+ | ee '/ | ||
+ | |||
+ | < | ||
+ | server { | ||
+ | listen ' | ||
+ | # http2 ' | ||
+ | server_name ' | ||
+ | root '/ | ||
+ | index ' | ||
+ | |||
+ | include '/ | ||
+ | include '/ | ||
+ | |||
+ | client_max_body_size ' | ||
+ | |||
+ | add_header Content-Security-Policy " | ||
+ | |||
+ | # access_log | ||
+ | # error_log | ||
+ | |||
+ | # location = / | ||
+ | # deny all; | ||
+ | # } | ||
+ | |||
+ | # location ~ / | ||
+ | # deny all; | ||
+ | # } | ||
+ | |||
+ | # location ~ /data/ { | ||
+ | # internal; | ||
+ | # } | ||
+ | |||
+ | location / { try_files $uri $uri/ @dokuwiki; } | ||
+ | |||
+ | location @dokuwiki { | ||
+ | rewrite ^/ | ||
+ | rewrite ^/ | ||
+ | rewrite ^/ | ||
+ | rewrite ^/(.*) / | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # End</ | ||
+ | |||
+ | ====== Initial Setup ====== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | ====== Settings ====== | ||
+ | |||
+ | ===== Plugins ===== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | ===== Template Style Settings ===== | ||
+ | |||
+ | * Alternative background color: ''# | ||
+ | * The general link color: ''# | ||
+ | * :!: The width of the full site: '' | ||
+ | |||
+ | ===== nginx Server Block Deny Directives ===== | ||
+ | |||
+ | * Uncomment commented sections (except logs) | ||
+ | * Do after initial setup | ||
+ | |||
+ | sudo -e '/ | ||
+ | |||
+ | ===== URL Rewrite ===== | ||
+ | |||
+ | * Admin -> Configuration Settings -> DokuWiki -> Advanced -> userewrite | ||
+ | |||
+ | .htaccess | ||
+ | |||
+ | ===== Double-hyphen Convert Disable ===== | ||
+ | |||
+ | * This prevents -- from becoming a – (long hyphen), which breaks some command' | ||
+ | |||
+ | echo ' | ||
+ | |||
+ | ====== Temp Commands ====== | ||
+ | |||
+ | ===== Update ===== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | su - | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | ===== Indexer ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | ===== Maintenance ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | ====== Backup ====== | ||
+ | |||
+ | ===== Folder ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | cd '/ | ||
+ | |||
+ | ===== scp ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | scp espionage724@192.168.1.152: | ||
+ | |||
+ | ====== Restore ====== | ||
+ | |||
+ | ===== scp ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | scp ~/' | ||
+ | |||
+ | ===== Folder ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | ls '/ | ||
+ | |||
+ | cd '/ | ||