Created
July 20, 2012 13:52
-
-
Save raphink/3150845 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApacheParamsModule | |
def initialize | |
@oses = ['Debian', 'RedHat', 'Ubuntu', 'CentOS'] | |
@vars = { | |
'Debian' => { | |
'pkg' => 'apache2', | |
'apache_root' => '/var/www', | |
'user' => 'www-data', | |
'group' => 'www-data', | |
'conf' => '/etc/apache2', | |
'log' => '/var/log/apache2', | |
'access_log' => '/var/log/apache2/access.log', | |
'a2ensite' => '/usr/sbin/a2ensite', | |
'error_log' => '/var/log/apache2/error.log' | |
}, | |
'RedHat' => { | |
'pkg' => 'httpd', | |
'apache_root' => '/var/www/vhosts', | |
'user' => 'apache', | |
'group' => 'apache', | |
'conf' => '/etc/httpd', | |
'log' => '/var/log/httpd', | |
'access_log' => '/var/log/httpd/access.log', | |
'a2ensite' => '/usr/local/sbin/a2ensite', | |
'error_log' => '/var/log/httpd/error.log' | |
} | |
} | |
@vars['Ubuntu'] = @vars['Debian'] | |
@vars['CentOS'] = @vars['RedHat'] | |
@modules = ['alias', 'auth_basic', 'authn_file', 'authz_default', 'authz_groupfile', 'authz_host', 'authz_user', 'autoindex', 'dir', 'env', 'mime', 'negotiation', 'rewrite', 'setenvif', 'status', 'cgi'] | |
end | |
end | |
class ApacheParams | |
include ApacheParamsModule | |
def initialize | |
super | |
end | |
def oses | |
@oses | |
end | |
def vars | |
@vars | |
end | |
def modules | |
@modules | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment