more changes
This commit is contained in:
parent
f21f3aaf2f
commit
bc5ca70f75
@ -1,10 +1,12 @@
|
||||
require 'apache/master'
|
||||
require 'apache/permissions'
|
||||
|
||||
module Apache
|
||||
class Config
|
||||
class << self
|
||||
include Apache::Master
|
||||
include Apache::Quoteize
|
||||
include Apache::Permissions
|
||||
|
||||
def build(target, &block)
|
||||
@config = []
|
||||
|
@ -59,16 +59,6 @@ module Apache
|
||||
group! group if group
|
||||
end
|
||||
|
||||
def deny_from_all
|
||||
order! "deny,allow"
|
||||
deny! "from all"
|
||||
end
|
||||
|
||||
def allow_from_all
|
||||
order! "allow,deny"
|
||||
allow! "from all"
|
||||
end
|
||||
|
||||
def passenger(ruby_root, ruby_version, passenger_version)
|
||||
end
|
||||
|
||||
|
13
lib/apache/permissions.rb
Normal file
13
lib/apache/permissions.rb
Normal file
@ -0,0 +1,13 @@
|
||||
module Apache
|
||||
module Permissions
|
||||
def deny_from_all
|
||||
order! "deny,allow"
|
||||
deny! "from all"
|
||||
end
|
||||
|
||||
def allow_from_all
|
||||
order! "allow,deny"
|
||||
allow! "from all"
|
||||
end
|
||||
end
|
||||
end
|
@ -1,3 +1,5 @@
|
||||
IPS = [ '127.0.0.1:80', '127.0.0.1:81' ]
|
||||
|
||||
Apache::Config.build('httpd.conf') do
|
||||
server_root '/var/html/apache'
|
||||
|
||||
@ -17,7 +19,7 @@ Apache::Config.build('httpd.conf') do
|
||||
deny_from_all
|
||||
end
|
||||
|
||||
virtual_host '127.0.0.1:80', '127.0.0.1:81' do
|
||||
virtual_host *IPS do
|
||||
directory '/' do
|
||||
allow_from_all
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user