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';
}
}