Ondrej Sika

Nginx echo server - text response directly from Nginx

18 May 2014

Install echo module

We must install HttpEchoModule http://wiki.nginx.org/HttpEchoModule#Installation.

This module is in debian packages nginx-extras or nginx-full.

Server config

To sites-enabled add file with this content

server {
    listen 80;
    server_name server1.ondrejsika.com;
    location / {
        default_type 'text/plain';
        echo 'server1.ondrejsika.com 1.43.23.187';
    }
}

Share on Facebook, Twitter, Google+, Linkedin

comments powered by Disqus

--