Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

539
Vistas
nginx/gunicorn + Django: subdomain configuration for third party application integration

I am building a regular django project - the difference is this:

  1. I want the django website to only "work" on a specified subdomain - for example, http://www.foo.mydomain.com

  2. I want to use an entirely different application to run on another specified subdomain - e.g. http://www.foobar.mydomain.com

How do I setup a django project, so that it only runs on a specific subdomain, and does not intercept requests to other subdomains - so other other applications can run on other subdomains on the same parent domain?

[[Note 1]]

The second application (running on the other subdomain is not a django app). In fact, it's mattermost, that I want to run on the other subdomain - so I can integrate mattermost into my website.

[[Note 2]]

I'm using nginx + gunicorn as the server

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Use a separate server block for each domain. See this document.

server {
    server_name www.foo.mydomain.com;
    ...
}
server {
    server_name www.foobar.mydomain.com;
    ...
}

Where a server_name match cannot be found, nginx will use the default server. So define a catch-all server block to prevent nginx using one of the server blocks above.

server {
    listen 80 default_server;
    deny all;
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda