1
4
mirror of https://github.com/yunginnanet/HellPot synced 2024-06-20 21:08:03 +00:00

Documentation: Apache example (#71)

This commit is contained in:
DJ1975 2023-03-01 01:59:39 +01:00 committed by GitHub
parent 22a52aff04
commit 23c1c5e38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -124,3 +124,39 @@ location '/wp-login.php' {
proxy_pass http://127.0.0.1:8080$request_uri;
}
```
## Example Web Server Config (apache)
All nonexisting URLs are being reverse proxied to a HellPot instance on localhost, which is set to catchall. Traffic served by HellPot is rate limited to 5 KiB/s.
* Create your normal robots.txt and usual content. Also create the fake Errordocument directory and files (files can be empty). In the example, the directory is "/content/"
* A request on a URL with an existing handler (f.e. a file) will be handled by apache
* Requests on nonexisting URLs cause a HTTP Error 404, which content is served by HellPot
* URLs under the "/.well-known/" suffix are excluded.
```
<VirtualHost yourserver>
ErrorDocument 400 "/content/400"
ErrorDocument 403 "/content/403"
ErrorDocument 404 "/content/404"
ErrorDocument 500 "/content/405"
<Directory "$wwwroot/.well-known/">
ErrorDocument 400 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
</Directory>
/* HTTP Honeypot / HellPot (need mod_proxy, mod_proxy_http) */
ProxyPreserveHost on
ProxyPass "/content/" "http://localhost:8080/"
ProxyPassReverse "/content/" "http://localhost:8080/"
/* Rate Limit config, need mod_ratelimit */
<Location "/content/">
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 5
</Location>
/* Remaining config */
</VirtualHost>
```