Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2 from tremblaysimon/improveModule
Browse files Browse the repository at this point in the history
Cleanup of code and added useful parameters
  • Loading branch information
Simon Tremblay committed May 13, 2015
2 parents 0add747 + 9634d89 commit 787d6f9
Show file tree
Hide file tree
Showing 4 changed files with 179 additions and 182 deletions.
134 changes: 55 additions & 79 deletions manifests/apache.pp
Original file line number Diff line number Diff line change
@@ -1,110 +1,86 @@
#class igo::apache

class igo::apache(
class igo::apache (

$igoRootPath,
$igoAppPath,
$appUser,
$appGroup
) {

include apache::mod::rewrite
include apache::mod::cgi

class { '::apache':
mpm_module => 'prefork',
mpm_module => 'prefork',
default_vhost => false,
user => $appUser,
group => $appGroup
user => $appUser,
group => $appGroup
}
class { '::apache::mod::php':
}
class { '::apache::mod::php': }

apache::vhost { 'igo':
vhost_name => '*',
port => '80',
docroot => $igoRootPath,
docroot_owner => $appUser,
docroot_group => $appGroup,
aliases => [
{ alias => '/pilotage',
path => "${igoAppPath}/pilotage/",
vhost_name => '*',
port => '80',
docroot => $igoRootPath,
docroot_owner => $appUser,
docroot_group => $appGroup,
aliases => [
{ alias => '/pilotage',
path => "${igoAppPath}/pilotage/",
},
{ alias => '/navigateur/',
path => "${igoAppPath}/interfaces/navigateur/",
},
{ alias => '/navigateur/',
path => "${igoAppPath}/interfaces/navigateur/",
{ alias => '/api/',
path => "${igoAppPath}/interfaces/navigateur/api/",
},
{ alias => '/api/',
path => "${igoAppPath}/interfaces/navigateur/api/",
}
],
directories =>
[
directories => [
{
path => "${igoAppPath}/pilotage/",
provider => 'directory',
php_value => 'max_input_vars 2000',
rewrites => [
{
rewrite_rule => [ '^$ public/ [L]' ]
},
{
rewrite_rule => [ '(.*) public/$1 [L]' ]
}

]
path => "${igoAppPath}/pilotage/",
provider => 'directory',
php_value => 'max_input_vars 2000',
rewrites => [
{ rewrite_rule => [ '^$ public/ [L]' ] },
{ rewrite_rule => [ '(.*) public/$1 [L]' ] },
],
},
{
path => "${igoAppPath}/pilotage/public/",
provider => 'directory',
path => "${igoAppPath}/pilotage/public/",
provider => 'directory',
add_default_charset => 'UTF-8',
rewrites => [
{
rewrite_cond => [ '%{REQUEST_FILENAME} !-d' ]
},
{
rewrite_cond => [ '%{REQUEST_FILENAME} !-f' ]
},
{
rewrite_rule => [ '^(.*)$ index.php?_url=/$1 [QSA,L]' ]
}
]
rewrites => [
{ rewrite_cond => [ '%{REQUEST_FILENAME} !-d' ] },
{ rewrite_cond => [ '%{REQUEST_FILENAME} !-f' ] },
{ rewrite_rule => [ '^(.*)$ index.php?_url=/$1 [QSA,L]' ] },
],
},
{
path => "${igoAppPath}/interfaces/navigateur/",
provider => 'directory',
rewrites => [
{
rewrite_rule => [ '^$ public/ [L]' ]
},
{
rewrite_rule => [ '(.*) public/$1 [L]' ]
}
]
path => "${igoAppPath}/interfaces/navigateur/",
provider => 'directory',
rewrites => [
{ rewrite_rule => [ '^$ public/ [L]' ] },
{ rewrite_rule => [ '(.*) public/$1 [L]' ] },
],
},
{
path => "${igoAppPath}/interfaces/navigateur/public/",
provider => 'directory',
path => "${igoAppPath}/interfaces/navigateur/public/",
provider => 'directory',
add_default_charset => 'UTF-8',
rewrites => [
{
rewrite_cond => [ '%{REQUEST_FILENAME} !-d' ]
},
{
rewrite_cond => [ '%{REQUEST_FILENAME} !-f' ]
},
{
rewrite_rule => [ '^(.*)$ index.php?_url=/$1 [QSA,L]' ]
}
]
rewrites => [
{ rewrite_cond => [ '%{REQUEST_FILENAME} !-d' ] },
{ rewrite_cond => [ '%{REQUEST_FILENAME} !-f' ] },
{ rewrite_rule => [ '^(.*)$ index.php?_url=/$1 [QSA,L]' ] },
],
},
{
path => "${igoAppPath}/interfaces/navigateur/api/",
provider => 'directory',
rewrites => [
{
rewrite_cond => [ '%{REQUEST_FILENAME} !-f' ]
},
{
rewrite_rule => [ '^(.*)$ index.php?_url=/$1 [QSA,L]' ]
}
]
path => "${igoAppPath}/interfaces/navigateur/api/",
provider => 'directory',
rewrites => [
{ rewrite_cond => [ '%{REQUEST_FILENAME} !-f' ] },
{ rewrite_rule => [ '^(.*)$ index.php?_url=/$1 [QSA,L]' ] },
],
},
],
}
Expand Down
Loading

0 comments on commit 787d6f9

Please sign in to comment.