[nginx] how does nginx debug?

novices under nginx see that there are many things similar to variables and constants in the configuration items, such as
like $url,$document_root of variables,
like QUERY_STRING of constants, and
where should I print their values?

another question I would like to ask is how can a second-level domain name be redirected to a port on a top-level domain name?
for example, when you visit admin.abc.com , you actually visit www.abc.com:8080 , while you can keep the link admin.abc.com unchanged?

Apr.02,2021

1. Debug return 200 $scheme;
2. It's not called redirection. Just configure admin.abc.com to reverse proxy to www.abc.com:8080

.
Menu