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

165
Vistas
Can nginx generate primitive responses on its own?

For debugging purposes, I'd like my nginx to return a simple response when I try to request a specific URL. For example:

Hello, friend! You've connected successfully! Your IP address is 1.2.3.4.

The IP address is important, otherwise I could use a static file.

In addition, I don't want to use external processes for generating the response - no (F)CGI, proxy, whatever. It should be NGINX itself, so I can test it in isolation.

So far, I haven't found a module that could do this. Is it possible?

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

0

You can do it using the below Nginx server configs

server {
    listen       80  default_server;
    server_name  _;
    location /health {
      return 200 'Hi From Nginx $remote_addr';
    }
}
$> curl http://127.0.0.1/health
Hi From Nginx 172.28.0.1
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