Closed hez2010 closed 4 years ago
Any response or updates on it?
Hi @hez2010 . It is worth creating a new thread on https://caddy.community to see if anyone can help you.
We need a lot more information to be able to see if we can solve this issue.
There is a long long thread on caddy.community, do you know if it is the same issue you are having?
@tobya I created a temporary test server and deployed Windows Admin Center on it. I will delete it after several days.
Access caddy reverse proxy to windows admin center: http://test.hez2010.com/ Access windows admin center directly: https://test.hez2010.com:1080/
username: hez2010, password: hez2010!hez2010 you can also use above credentials to access the server using RDP.
Caddyfile:
(proxy) {
websocket
transparent
}
0.0.0.0:80 {
proxy / https://localhost:1080 {
import proxy
insecure_skip_verify
keepalive 64
}
}
While accessing the caddy reverse proxy, it will return a '502 bad gateway' after authorized.
Thanks for the setup, I took a quick look but couldnt find anything obvious.
Try posting this to https://caddy.community there are great people there who can help you, particurily while you have this VM setup.
I got this working in Caddy 2.
NGINX has a directive for this but it's commercial/proprietary: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#ntlm
Ours is open source.
Have a lot of cleanup to do but will be pushing the code after that.
More details in this thread: https://caddy.community/t/doesnt-work-when-reverse-proxy-windows-admin-center/6408/41?u=matt
This works now (Caddy 2).
Scroll down from here and you'll see how to use the http_ntlm
transport module: https://github.com/caddyserver/caddy/wiki/v2:-Documentation#httphandlersreverse_proxy
Here's my config, for example:
{
"handler": "reverse_proxy",
"transport": {
"protocol": "http_ntlm",
"tls": {
"insecure_skip_verify": true
}
},
"upstreams": [
{"dial": "wac:1080"}
]
}
Im kinda new to caddy I'm coming from nginx atm. I'm running caddy-gen for automated ssl docker container. But I'm still not sure how my config should look like. I need ntlm support to my iis server on :443
So how should my config look if I wanna define the sub.domain.com to ntlm to localip:443 iis?
@mvthul You need to build caddy2 with nltm-transport module manually and then use http_ntlm
protocol for your proxy.
So I'm just wondering should this work:
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"} ] }
@mvthul please ask on the community forums, it's a better place to ask than an old closed issue. https://caddy.community
But that said, you can't mix JSON and Caddyfile syntax. Please go through these pages in the docs:
https://caddyserver.com/docs/caddyfile/concepts
https://caddyserver.com/docs/caddyfile/directives/reverse_proxy
You need to configure the reverse_proxy
directive with the http_ntlm
transport (instead of http
).
1. Which version of Caddy are you using (
caddy -version
)?Caddy v1.0.3 (h1:i9gRhBgvc5ifchwWtSe7pDpsdS9+Q0Rw9oYQmYUTw1w=)
2. What are you trying to do?
I'm trying to setup a reverse proxy for Windows Admin Center
3. What is your Caddyfile?
4. How did you run Caddy (give the full command and describe the execution environment)?
5. Please paste any relevant HTTP request(s) here.
Access Windows Admin Center directly:
Use caddy as a reverse proxy:
6. What did you expect to see?
All things work well.
7. What did you see instead (give full error messages and/or log)?
After authentication, I got a 502 Bad Gateway. Output from caddy server:
8. Why is this a bug, and how do you think this should be fixed?
I used to use nginx and it did work. I don't know why caddy has this problem.
9. What are you doing to work around the problem in the meantime?
No work around currently.
10. Please link to any related issues, pull requests, and/or discussion.
Discussion: https://caddy.community/t/windows-admin-center-portainer-as-subdirectory/4024 Windows Admin Center downloads: https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/understand/windows-admin-center
Bonus: What do you use Caddy for? Why did you choose Caddy?
It's fast and convenient.