How to reverse_proxy tengine site

1. The problem I’m having:

I can’t reverse_proxy this site

2. Error messages and/or full log output:

{"upstream": "", "duration": 11.0931018, "request": {"remote_ip": "", "remote_port": "37518", "client_ip": "", "proto": "HTTP/1.1", "method": "GET", "host": "", "uri": "/web.html", "headers": {"X-Forwarded-Host": [""], "User-Agent": ["Mozilla/5.0 (Windows NT; Windows NT 10.0; zh-CN) WindowsPowerShell/5.1.19041.4522"], "X-Forwarded-For": [""], "X-Forwarded-Proto": ["http"]}}, "headers": {"Server": ["Tengine"], "Date": ["Fri, 14 Jun 2024 00:35:00 GMT"], "Content-Type": ["text/html"], "Content-Length": ["609"], "Set-Cookie": ["REDACTED"]}, "status": 500}

3. Caddy version:

v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=

4. How I installed and ran Caddy:

a. System environment:

Windows10, x64

b. Command:

.\caddy.exe run

c. Service/unit/compose file:

d. My complete Caddy config:


:80 {
	# tls ./certs/1.pem ./certs/1.key
	encode zstd gzip
	reverse_proxy {
		header_up Host {upstream_hostport}
		transport http {
			dial_timeout 20s

5. Links to relevant resources:

There’s not enough information here for us to help. Please post you full logs, not just one line. Show an example request with curl -v. Please explain the problem in more detail. Please completely fill out the help topic template as per the forum rules.

I see that the log has "status": 500, that suggests a problem with the upstream app. That’s not something we can help you with, you’ll need to get help from the upstream app or look at the logs to understand why it happens.

1 Like
curl -vL
*   Trying
* Connected to ( port 80
> GET /web.html HTTP/1.1
> Host:
> User-Agent: curl/8.6.0
> Accept: */*
< HTTP/1.1 500 Internal Server Error
< Content-Length: 609
< Content-Type: text/html
< Date: Sat, 15 Jun 2024 03:47:19 GMT
< Server: Caddy
< Server: Tengine
< Set-Cookie: ray_leech_token=1718423240; path=/
<a href=/_ascnlink_k></a>
<head><title>500 Internal Server Error</title></head>
<center><h1>500 Internal Server Error</h1></center>
 Sorry for the inconvenience.<br/>
Please report this message and include the following information to us.<br/>
Thank you very much!</p>
<td>2024/06/15 11:47:19</td>
<hr/>Powered by Tengine<hr><center>tengine</center>
* Connection #0 to host left intact

This is the log information, I don’t have the upstream information, but the nginx reverse proxy is ok


The problem could be anything, we don’t have enough information to help here. You’ll have to get in contact with whoever runs that server to explain why their server responds that way.

1 Like

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