diff options
-rw-r--r-- | modules/phpbb/manifests/init.pp | 5 | ||||
-rw-r--r-- | modules/phpbb/templates/forums_vhost.conf | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/modules/phpbb/manifests/init.pp b/modules/phpbb/manifests/init.pp index 438a28f0..1e04b76a 100644 --- a/modules/phpbb/manifests/init.pp +++ b/modules/phpbb/manifests/init.pp @@ -37,6 +37,11 @@ class phpbb { owner => root, group => root, } + + apache::vhost_base { "forums.$domain": + content => template("phpbb/forums_vhost.conf"), + } + } define phpbb_config($value) { diff --git a/modules/phpbb/templates/forums_vhost.conf b/modules/phpbb/templates/forums_vhost.conf new file mode 100644 index 00000000..bb2721e9 --- /dev/null +++ b/modules/phpbb/templates/forums_vhost.conf @@ -0,0 +1,12 @@ + # TODO redirect based on language settings + # and the presence of the forum + Redirect / /en/ + AliasMatch ^/(..)/(.*) <%= forums_dir %>/$1/phpBB/$2 + + <Directory <%= forums_dir %>/.*/phpBB/> + Allow from all + </Directory> + + <Directory <%= forums_dir %>/.*/phpBB/install/> + Deny from all + </Directory> |