Skip to content

Commit

Permalink
Reformatted examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
arut committed Sep 24, 2017
1 parent 771d6bd commit 4de40a0
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ operate at configuration time.
Examples
========

.. _remote_conf_example:
Remote configuration
--------------------

Remote nginx.conf example. This example shows how to load the essential
part of nginx configuration file from a remote server::
Loading the essential part of nginx configuration file from a remote server::

# nginx.conf

Expand All @@ -192,7 +192,9 @@ part of nginx configuration file from a remote server::

include /tmp/nginx.conf;

Python variable::
Variables
---------
::

# nginx.conf

Expand All @@ -212,8 +214,10 @@ Python variable::
}
}

Python access and content handlers. Dynamic Python module is used in this
example::
Phase handlers
--------------

Dynamic Python module is used in this example::

# nginx.conf

Expand Down Expand Up @@ -256,7 +260,9 @@ example::
r.send('1234567890');
r.send('abcdefgefg', ngx.SEND_LAST)

UDP reports in Python::
UDP socket
----------
::

# nginx.conf

Expand Down Expand Up @@ -292,7 +298,9 @@ UDP reports in Python::

ds.send(r.var['request'])

Making HTTP requests from Python in runtime::
HTTP request in runtime
-----------------------
::

# nginx.conf

Expand Down Expand Up @@ -331,7 +339,9 @@ Making HTTP requests from Python in runtime::
r.ho['x-reason'] = resp.reason;
r.ho['x-body'] = resp.read()

Simple echo server::
Echo server
-----------
::

# nginx.conf

Expand Down

0 comments on commit 4de40a0

Please sign in to comment.