diff --git a/lib/apache.rb b/lib/apache.rb index 59bbfc7..8ef3901 100644 --- a/lib/apache.rb +++ b/lib/apache.rb @@ -10,6 +10,7 @@ module Apache autoload :Rewrites, 'apache/rewrites' autoload :SSL, 'apache/ssl' autoload :MPM, 'apache/mpm_prefork' + autoload :Proxy, 'apache/proxy' module Rake autoload :Support, 'apache/rake/support' diff --git a/lib/apache/config.rb b/lib/apache/config.rb index 915cca9..e4abbe3 100644 --- a/lib/apache/config.rb +++ b/lib/apache/config.rb @@ -61,6 +61,7 @@ module Apache include Apache::Rewrites include Apache::MPM include Apache::SSL + include Apache::Proxy # Build the provided configuration only if the current environment matches one of the conditions def build_if(target, *conditions, &block) diff --git a/lib/apache/proxy.rb b/lib/apache/proxy.rb new file mode 100644 index 0000000..1c28531 --- /dev/null +++ b/lib/apache/proxy.rb @@ -0,0 +1,8 @@ +module Apache + module Proxy + def proxy(*args, &block) + blockify('proxy'.apachify, *args, &block) + end + end +end + diff --git a/lib/apache/rewrites.rb b/lib/apache/rewrites.rb index 9f16770..6a410f3 100644 --- a/lib/apache/rewrites.rb +++ b/lib/apache/rewrites.rb @@ -243,6 +243,7 @@ module Apache # * :redirect => true #=> [R] # * :redirect => 302 #=> [R=302] # * :pass_through => true #=> [PT] + # * :proxy => true #=> [P] # * :preserve_query_string => true #=> [QSA] # * :query_string_append => true #=> [QSA] # * :env => 'what' #=> [E=what]