The way to Print everything on Nginx.
./configure --add-module=/path/to/ngx-http-print-module
make
make install
- Syntax: print_hostname header_name;
- Default: —
- Context: http, server, location, if in location
Print hostname into Response Header.
server {
listen 8000;
server_name localhost;
location / {
print_hostname "X-Host";
root html;
index index.html;
}
}