1472148193 | current | ||
---|---|---|---|
Line 256: | Line 256: | ||
Then go in "Handler" section and select HTTP Error. Finally select "403 Forbidden" in HTTP Error. | Then go in "Handler" section and select HTTP Error. Finally select "403 Forbidden" in HTTP Error. | ||
+ | |||
+ | ==== Deny Directory Access in Caddy ==== | ||
+ | Here is an example Caddyfile for a wiki served with [[https://caddyserver.com|Caddy]]: | ||
+ | <code> | ||
+ | wiki.example.com { | ||
+ | log /var/log/caddy/dokuwiki.log | ||
+ | root /var/www/dokuwiki/ | ||
+ | # Assuming install/config of php-fpm | ||
+ | # to listen on localhost:9000 | ||
+ | fastcgi / 127.0.0.1:9000 php | ||
+ | # This block below sends an HTTP 401 message when | ||
+ | # a client attempts to access the secured directories. | ||
+ | status 401 { | ||
+ | /data | ||
+ | /conf | ||
+ | /bin | ||
+ | /inc | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
==== Rename data Directory ==== | ==== Rename data Directory ==== |
↧
security - Added information on Caddy Server configuration
↧