==== httpd (OpenBSD) ==== See also [[https://man.openbsd.org/httpd.conf.5|httpd documentation]]. By default the server root is /var/www and dokuwiki is in /var/www/dokuwiki server "default" { listen on egress port 443 root "/dokuwiki" directory index doku.php # Set according to upload_max_filesize and post_max_size in php.ini connection max request body 20971520 location "*.php" { fastcgi socket "/run/php-fpm.sock" } # Block access to non-public dirs location "/data/*" { block } location "/conf/*" { block } location "/bin/*" { block } location "/inc/*" { block } location "/vendor/*" { block } # URL rewrite rules location match "/media/(.*)" { request rewrite "/lib/exe/fetch.php?media=%1" } location match "/detail/(.*)" { request rewrite "/lib/exe/detail.php?media=%1" } location match "/export/([^/]+)/(.*)" { request rewrite "/doku.php?do=export_%1&id=%2" } location match "/(lib/.*)" { request rewrite "/%1" } location match "/([^lib])" { request rewrite "/doku.php?id=$DOCUMENT_URI&$QUERY_STRING" } }