Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
Wildcard subdomain in Ngnix

I want to configure Nginx as a reverse proxy. But i want to configure it only for a part of subdomain, which is dyanamic. I tried with * and it didnt work. Can anyone help me here.

server {
    listen 80;
    server_name  (dynamic_part)-clientapp.mydomain.com;

    location / {
    }
}

Thanks in advance.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

the reason the * is not working:

A wildcard name may contain an asterisk only on the name’s start or end, and only on a dot border. The names “www..example.org” and “w.example.org” are invalid. However, these names can be specified using regular expressions, for example, “~^www..+.example.org$” and “~^w..example.org$”. An asterisk can match several name parts. The name “.example.org” matches not only www.example.org but www.sub.example.org as well.

http://nginx.org/en/docs/http/server_names.html

Did you try it with a regex, like as example:

server {
    listen 80;
    server_name  ~(.*)-clientapp\.mydomain\.com;


    location / {
    }
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda