Skip to content

Instantly share code, notes, and snippets.

@raphink
Created July 20, 2012 13:40
Show Gist options
  • Save raphink/3150766 to your computer and use it in GitHub Desktop.
Save raphink/3150766 to your computer and use it in GitHub Desktop.
module ApacheParams
# Define default params
def oses
@oses = ['Debian', 'RedHat', 'Ubuntu', 'CentOS']
end
def vars
@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']
end
def modules
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment