3. Conclusion

There are 11 directives (listed in Table 2.1, “ModRuby Apache Configuration Directives”) which are basically split into two contexts: server context and handler context. Server context pertains to settings and declarations that are specific to the (global) server environment. These include setting configuration variables (key value pair) and environmental variables (which show up in the CGI environment). Handler context pertains to framework handlers. In this context, you can define specialized configuration variables associated with specific framework handlers.

Table 2.1. ModRuby Apache Configuration Directives

NameArgsScopeDescription
RubyDefaultHandlerModule{module_name}AnywhereSet default Ruby module for Apache handler
RubyDefaultHandlerClass{class_name}AnywhereSet default Ruby class for Apache handler
RubyDefaultHandlerMethod{method_name}AnywhereSet default Ruby method for Apache handler
RubyConfig{key} {value}AnywhereSet server-level configuration setting
RubyEnv{key} {value}AnywhereSet environmental server-level variable
RubyHandler{handler_name}AnywhereSet the framework handler to fire for a given context
RubyHandlerDeclare{handler_name}GlobalDeclare a new Ruby handler
RubyHandlerModule{handler_name} {module_name}GlobalDefine module for declared handler
RubyHandlerClass{handler_name} {class_name}GlobalDefine class for declared handler
RubyHandlerMethod{handler_name} {method_name}GlobalDefine method for declared handler
RubyHandlerConfig{handler_name} {key} {value}GlobalDefine a handler-level configuration setting