No description, website, or topics provided.
C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
config
ngx_include_shell_module.c

README.md

Include the output of program as nginx config.

Install:

./configure ... --add-module=[path_to_module_dir]

Usage:

Put include_shell directive to nginx.conf:

include_shell [path_to_file_where_the_output_will_be_generated] [program_to_execute];

[program_to_execute]'s cwd will be the directory of the config file where include_shell is set.

Example:

include_shell /tmp/tmp-nginx.conf "/bin/echo root /var/www;";

include_shell /tmp/tmp-nginx-gen.conf "/bin/php script_to_generate_conf.php";