Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!