| Path: | src/ruby_supportlib/phusion_passenger/nginx/config_options.rb |
| Last Update: | Thu Mar 03 11:43:02 +0000 2016 |
Phusion Passenger - www.phusionpassenger.com/ Copyright (c) 2013-2016 Phusion Holding B.V.
"Passenger", "Phusion Passenger" and "Union Station" are registered trademarks of Phusion Holding B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| LOCATION_CONFIGURATION_OPTIONS | = | [ { :name => 'passenger_socket_backlog', :type => :integer, :context => [:main], :struct => "NGX_HTTP_MAIN_CONF_OFFSET" |
This file defines all supported Nginx per-location configuration options.
The build system automatically generates the corresponding Nginx module
boilerplate code from the definitions in this file.
Main configuration options are not defined in this file, but are defined in src/nginx_module/Configuration.c instead. The following boilerplate code is generated: * ngx_command_t array members (ConfigurationCommands.c.erb) * Location configuration structure definition (ConfigurationFields.h.erb) * Location configuration structure initialization (CreateLocationConfig.c.erb) * Location configuration merging (MergeLocationConfig.c.erb) * Conversion of configuration options to CGI headers (CacheLocationConfig.c.erb) Options:
* name - The configuration option name. Required.
* context - The context in which this configuration option is valid.
Defaults to [:main, :srv, :loc, :lif]
* type - This configuration option's value type. Allowed types:
:string, :integer, :uinteger, :flag, :string_array, :string_keyval,
:path
* take - Tells Nginx how many parameters and what kind of parameter
this configuration option takes. It should be set to a string
such as "NGX_CONF_FLAG".
By default this is automatically inferred from `type`: for
example if `type` is :string then ConfigurationCommands.c.erb
will infer that `NGX_CONF_TAKE1` should be used.
* function - The name of the function that should be used to store the
configuration value into the corresponding structure. This function
is not auto-generated, so it must be the name of an existing
function. By default, the function name is automatically inferred
from `type`. For example if `type` is string then `function` is
inferred to be `ngx_conf_set_str_slot`.
If you set this to a string then you are responsible for defining
said function in Configuration.c.
* struct - The type of the struct that the field is contained in. Something like
"NGX_HTTP_LOC_CONF_OFFSET" (which is also the default).
* field - The name that should be used for the auto-generated field in
the location configuration structure. Defaults to the configuration
name without the 'passenger_' prefix. Set this to nil if you do not
want a structure field to be auto-generated. If the field name contains
a dot (.e.g `upstream_config.pass_headers`) then the structure field will
also not be auto-generated, because it is assumed to belong to an existing
structure field.
* post - The extra information needed by function for post-processing.
* header - The name of the corresponding CGI header. By default CGI header
generation code is automatically generated, using the configuration
option's name in uppercase as the CGI header name.
Setting this to nil, or setting `field` to a value containing a dot,
will disable auto-generation of CGI header generation code. You are
then responsible for writing CGI header passing code yourself in
ContentHandler.c.
* auto_generate_nginx_merge_code - Whether location configuration merging
code should be automatically generated. Defaults to true. If you set
this to false then you are responsible for writing merging code
yourself in Configuration.c.
* alias_for - Set this if this configuration option is an alias for another
option. Alias definitions must only have the `name` and `alias_for`
fields, nothing else.
|