Hey Pavel,

thanks for your response. I have adapted my configuration and came up
with this:

<SNIP>
ext4="51.15.10.194"
ext6="2001:bc8:2d08::1"

table <monit> { "127.0.0.1" }
table <httpd> { "127.0.0.1" }

http protocol "monit" {
    match request header "Host" value "status.affekt.org" forward to <monit>
    match request header "Host" value "affekt.org" forward to <httpd>
}

relay "proxy" {
    listen on $ext4 port 80
    protocol "monit"
    forward to <monit> port 2812
    forward to <httpd> port 80
}
</SNIP>

I have a local monit instance listening on 127.0.0.1:2812

This configuration works, sort of:
- Is there a way to match all hosts that are not "status.affekt.org"?
  That way I don't have to write a filter rule for every subdomain
- Relayed HTTP output is cut off. As you can see below the HTTP DOM is not
  closed and most of the HTTP response headers are missing (status code,
  content-length, etc.)

Any idea what I'm doing wrong?

Thanks!

hera ~ % curl -v "http://status.affekt.org/";
*   Trying 51.15.10.194...
* TCP_NODELAY set
* Connected to status.affekt.org (51.15.10.194) port 80 (#0)
> GET / HTTP/1.1
> Host: status.affekt.org
> User-Agent: curl/7.58.0
> Accept: */*
> 
Connection: close
Content-Type: text/html
WWW-Authenticate: Basic realm="monit"

* Connection #0 to host status.affekt.org left intact
<html><head><title>401 Unauthorized</title></head><body
bgcolor=#FFFFFF><h2>Unauthorized</h2>You are not authorized to access
monit. Either you supplied the wrong credentials (e.g. bad password), or
your browser doesn't understand how to supply the credentials required


Reply via email to