working on more directives
This commit is contained in:
parent
7cecf8bb7c
commit
113abc74f7
@ -62,6 +62,7 @@ module Apache
|
||||
include Apache::Performance
|
||||
include Apache::Rewrites
|
||||
include Apache::MPM
|
||||
include Apache::SSL
|
||||
|
||||
# Build the provided configuration only if the current environment matches one of the conditions
|
||||
def build_if(target, *conditions, &block)
|
||||
|
@ -19,7 +19,20 @@ module Apache
|
||||
|
||||
private
|
||||
def create_options_list(tag, *opt)
|
||||
self << "#{tag} #{apachify(opt) * " "}"
|
||||
opt = opt.collect do |o|
|
||||
case o
|
||||
when Symbol
|
||||
if o.to_s[0..3] == 'not_'
|
||||
"-#{apachify(o.to_s[4..-1])}"
|
||||
else
|
||||
apachify(o)
|
||||
end
|
||||
else
|
||||
apachify(o)
|
||||
end
|
||||
end
|
||||
|
||||
self << "#{tag} #{opt * " "}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -6,7 +6,7 @@ module Apache
|
||||
# enable_rewrite_engine :log_level => 1 #=>
|
||||
# RewriteEngine on
|
||||
# RewriteLogLevel 1
|
||||
def enable_rewrite_engine(options)
|
||||
def enable_rewrite_engine(options = {})
|
||||
self << ''
|
||||
rewrite_engine! :on
|
||||
options.each do |option, value|
|
||||
@ -179,6 +179,8 @@ module Apache
|
||||
case key
|
||||
when :last
|
||||
'L'
|
||||
when :pass_through
|
||||
'PT'
|
||||
when :preserve_query_string
|
||||
'QSA'
|
||||
end
|
||||
|
@ -0,0 +1,17 @@
|
||||
module Apache
|
||||
module SSL
|
||||
def enable_ssl_engine(options = {})
|
||||
self << ""
|
||||
self << "SSLEngine on"
|
||||
options.each do |k, v|
|
||||
case k
|
||||
when :certificate_file, :certificate_key_file
|
||||
self << "SSL#{apachify(k)} #{quoteize(v).first}"
|
||||
when :ca_certificate_file
|
||||
self << "SSLCACertificateFile #{quoteize(v).first}"
|
||||
end
|
||||
end
|
||||
self << ""
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user