Help please with caddy NTLM config

I got ntlm module added in caddy

But im wondering how I should setup the Caddyfile to route to this iis host with ntlm parameters.

Caddyfile:

wac.domain.com {
“handler”: “reverse_proxy”,
“transport”: {
“protocol”: “http_ntlm”,
“tls”: {
“insecure_skip_verify”: true
}
},
“upstreams”: [
{“dial”: “192.168.1.100:433”}
]
}

Is this gonna work?

Like I said on Github, you can’t mix JSON and Caddyfile syntax. Did you read the docs?

You’ll also need to download a build of Caddy with the ntlm plugin from Download Caddy or use xcaddy to build it

You didn’t fill out the help thread template, please do so.

And when posting code snippets, please use ``` on the lines before and after your config/logs to use code formatting.

For reference: Doesn't work when reverse proxy Windows Admin Center - #49 by matt

1 Like
windowsadmincenter.domain.com {
  import tls
  reverse_proxy {
    transport http_ntlm {
                tls_insecure_skip_verify
        }
    to $IPADDRESS:443
  }
  encode zstd gzip
  log {
    output stdout
  }
}

Found a solution! this well applies for nextcloud with:

nextcloud.domain.com {
  import tls
  reverse_proxy {
    transport http {
                tls_insecure_skip_verify
        }
    to $IPADDRESS:443
  }
  encode zstd gzip
  log {
    output stdout
  }
}

or json format:

                                                {
                                                        "match": [
                                                                {
                                                                        "host": [
                                                                                "windowsadmincenter.domain.com"
                                                                        ]
                                                                }
                                                        ],
                                                        "handle": [
                                                                {
                                                                        "handler": "subroute",
                                                                        "routes": [
                                                                                {
                                                                                        "handle": [
                                                                                                {
                                                                                                        "encodings": {
                                                                                                                "gzip": {},
                                                                                                                "zstd": {}
                                                                                                        },
                                                                                                        "handler": "encode"
                                                                                                },
                                                                                                {
                                                                                                        "handler": "reverse_proxy",
                                                                                                        "transport": {
                                                                                                                "protocol": "http_ntlm",
														"tls": {
														"insecure_skip_verify": true
														}
                                                                                                        },
                                                                                                        "upstreams": [
                                                                                                                {
                                                                                                                        "dial": "$IPADDRESS:443"
                                                                                                                }
                                                                                                        ]
                                                                                                }
                                                                                        ]
                                                                                }
                                                                        ]
                                                                }
                                                        ],
                                                        "terminal": true
                                                },

Now im fully migrated from nginx to caddy! Topic can be closed!

This topic was automatically closed after 30 days. New replies are no longer allowed.