New answers tagged

1 vote

Nginx Embedded Variables - How do you get the domain name used in a request?

From server_name variable documentation, you can try with "named capture groups". This handles subdomains (but not the subdomain-less corner cases...): server { listen 80; listen [::]...
sphakka's user avatar
  • 222

Top 50 recent answers are included