Simple Nginx module for producing HTTP response
server {
listen 10086;
server_name localhost;
location /t {
print_flush on;
print_sep "\t";
print_ends "\r\n";
print "Today" "is";
print "Wednesday";
print "I like";
print "Nginx";
print_duplicate 10 1000 "Hi" "It" "is a duplicate message.";
}
}
syntax: print_sep <separator>
phase: content
Set the separator between two messages.
syntax: print_ends <ends>
phase: content
Set the end string after all the messages.
syntax: print_flush on | off
phase: content
When this option is enable, messages will be flushed as soon as possible.
syntax: print <message1> <message2> ...
phase: content
Print some messages, you can specify any number of messages(larger or equal to 1). Note all the messages generated by this directive will be collected in one buffer, so the end string is only existed once after all messages.
syntax: print_duplicate count interval <message1> <message2> ...
phase: content
Print some messages every interval
time, count
times total. you can specify any number of messages(larger or equal to 1).
- Supports the NGINX variables.