Nginx server_name translate caddyfile

when i set caddyfile is

:2016
reverse_proxy /* 127.0.0.1:8081 {
transport http {
keepalive_idle_conns 2
keepalive_idle_conns_per_host 2
keepalive 60s
}
}
No problem with local debugging startup

when i want set domain name like nginx.conf server_name,(hosts set 127.0.0.1 localhost)

:2016

localhost {
reverse_proxy /* 127.0.0.1:8081 {
transport rpc {
keepalive_idle_conns 2
keepalive_idle_conns_per_host 2
keepalive 60s
# web_flag is_csrf
}
}
}
Unable to run and reported error unrecognized direct: localhost

please tell me why?

See the docs:

The site address comes first, including a domain & port.

Please fill out the help topic template as per the forum rules. And mind your post’s formatting. Your config lost all indentation, so it’s extremely hard to read.

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