Caddy can't show webpage

I have just set up my Caddy 2. At the beginning, it worked normally. However, it fails to show the content after I changed it as a reverse proxy. Just don’t know what’s wrong. The following is the config of my Caddyfile:

example.com {
root * /var/www/html/example.com
log {
output file /etc/caddy/caddy.log
}
tls {
protocols tls1.2 tls1.3
ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
curves x25519
}
@v2ray_websocket {
path /ray
header Connection Upgrade
header Upgrade websocket
}
reverse_proxy @v2ray_websocket localhost:12000
}

file_server

Anyone is kind enough to help?

Hi @milanolarry,

What’s your Caddy version?

What actually happens when it fails to show the content? Do you get an error?

Do you get content, just not what you’re expecting?

Can you give us an example of a request, what content you expect, and what you get instead (e.g. specific errors)?

When you say “after I changed it as a reverse proxy”, can you specify what the config was before the change?

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