Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Apache example #71

Merged
merged 3 commits into from
Mar 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,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>
```