install:openbsd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
install:openbsd [2023-08-23 22:27] – Note small bugs in the OpenBSD ports and their fixes fiwswe | install:openbsd [2023-09-09 14:11] (current) – Include a better httpd(8) configuration fiwswe | ||
---|---|---|---|
Line 76: | Line 76: | ||
</ | </ | ||
- | Note: The above is a very generic minimal configuration. You SHOULD probably set DokuWiki up to use HTTPS so that login credentials will be transferred securely. It is fairly easy to do this using e.g. [[https:// | + | Note: The above is a very generic minimal configuration. |
+ | |||
+ | A slightly better configuration which would be accessible using the url '' | ||
+ | <code autoconf> | ||
+ | # Redirect HTTP requests to HTTPS and handle ACME certificate verification | ||
+ | # requests. | ||
+ | server " | ||
+ | listen on * port 80 | ||
+ | |||
+ | # Add other hostnames here if you have multiple virtual hosts that | ||
+ | # require the same functionality. No need to write extra server {} | ||
+ | # blocks for them. | ||
+ | # alias " | ||
+ | |||
+ | block return 301 " | ||
+ | |||
+ | location "/ | ||
+ | pass | ||
+ | root "/ | ||
+ | request strip 2 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # This is the server for hosting a DokuWiki website. | ||
+ | server " | ||
+ | # Always use HTTPS so that login credentials are encrypted. | ||
+ | listen on * tls port 443 | ||
+ | |||
+ | tls { | ||
+ | # Adjust these paths for the ones your certificate uses. | ||
+ | certificate "/ | ||
+ | key "/ | ||
+ | } | ||
+ | |||
+ | # If you are using the default DokuWiki as installed from the | ||
+ | # OpenBSD dokuwiki port then this is your root directory. If | ||
+ | # you are using a manual installation, | ||
+ | root "/ | ||
+ | |||
+ | # Make sure that https://< | ||
+ | # https://< | ||
+ | directory index doku.php | ||
+ | |||
+ | # Block some things. | ||
+ | # Note: The first matching location statement wins. Thus the | ||
+ | # order is important. | ||
+ | location " | ||
+ | location " | ||
+ | location "/ | ||
+ | location "/ | ||
+ | location "/ | ||
+ | location "/ | ||
+ | location "/ | ||
+ | |||
+ | # If nothing was blocked then handle PHP scripts. | ||
+ | location " | ||
+ | # If you are running multiple versions of php-fpm | ||
+ | # you may need to adjust the socket path. | ||
+ | fastcgi socket "/ | ||
+ | } | ||
+ | } | ||
+ | </ | ||
Don't forget to check your configuration using '' | Don't forget to check your configuration using '' |
install/openbsd.1692822434.txt.gz · Last modified: 2023-08-23 22:27 by fiwswe