-
Notifications
You must be signed in to change notification settings - Fork 218
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
got 502 error when accessing http sites #36
Comments
Does that happen for all HTTP hosts or for particular few? |
Yes, as long as http sites it reports 502.
Looks good, right? Then I visit a http site, for example http://earthquake.usgs.gov/ over forwardproxy, the log are
|
It seems like forwardproxy regards the http site I visit is under my domain, |
We stopped parsing hostname from Host field, this fixes it back. Implicit port 80 is good not only for GET, so I changed the logic to try port 80 on all non-connects. While testing, I also realized that switchy omega doesn't actually presend credentials, (somehow I thought it did), so I removed a link to it from the README.md to avoid confusion. Fixes #36
We stopped parsing hostname from Host field, this fixes it back. Implicit port 80 is good not only for GET, so I changed the logic to try port 80 on all non-connects. While testing, I also realized that switchy omega doesn't actually presend credentials, (somehow I thought it did), so I removed a link to it from the README.md to avoid confusion. Fixes #36
Bug is fixed (updated version is available on caddyserver.com) |
1. What version of Caddy are you using (
caddy -version
)?Caddy 0.11.0 (non-commercial use only)
2. What are you trying to do?
Use forwardproxy plugin to serve as a forward proxy.
3. What is your entire Caddyfile?
4. How did you run Caddy (give the full command and describe the execution environment)?
./caddy --conf=/usr/local/caddy/Caddyfile -agree
centos 6.9 x64
5. Please paste any relevant HTTP request(s) here.
6. What did you expect to see?
7. What did you see instead (give full error messages and/or log)?
When I access https sites over the https proxy, it works fine. But for http site it shows
502 Bad Gateway
in broswer.Caddy's log here
01/Jul/2018:08:40:45 -0400 [ERROR 502 /favicon.ico] dial failed: Lookup of fai led: lookup : no such host 01/Jul/2018:08:40:46 -0400 [ERROR 502 /] dial failed: Lookup of failed: lookup : no such host 01/Jul/2018:08:40:51 -0400 [ERROR 502 /] dial failed: Lookup of failed: lookup : no such host 01/Jul/2018:08:40:53 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host 01/Jul/2018:08:40:54 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host 01/Jul/2018:08:40:54 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host 01/Jul/2018:08:40:54 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host 01/Jul/2018:08:40:54 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host 01/Jul/2018:08:40:54 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host 01/Jul/2018:08:40:54 -0400 [ERROR 502 /image] dial failed: Lookup of failed: l ookup : no such host
What surprised me most is that I have tested an exactly same caddyfile(except domain) on another server , also with caddy 0.11.0, and nothing like this happend.
8. How can someone who is starting from scratch reproduce the bug as minimally as possible?
The text was updated successfully, but these errors were encountered: