Merge pull request #11 from drdla/patch-1

Add parameter to rewrite www to non-www
This commit is contained in:
James Fryman 2012-09-17 10:27:53 -07:00
commit a5b8acbd6e

View file

@ -18,6 +18,8 @@
# [*ssl_cert*] - Pre-generated SSL Certificate file to reference for SSL Support. This is not generated by this module. # [*ssl_cert*] - Pre-generated SSL Certificate file to reference for SSL Support. This is not generated by this module.
# [*ssl_key*] - Pre-generated SSL Key file to reference for SSL Support. This is not generated by this module. # [*ssl_key*] - Pre-generated SSL Key file to reference for SSL Support. This is not generated by this module.
# [*www_root*] - Specifies the location on disk for files to be read from. Cannot be set in conjunction with $proxy # [*www_root*] - Specifies the location on disk for files to be read from. Cannot be set in conjunction with $proxy
# [*rewrite_www_to_non_www*] - Adds a server directive and rewrite rule to rewrite www.domain.com to domain.com in order to avoid
# duplicate content (SEO);
# #
# Actions: # Actions:
# #
@ -44,7 +46,8 @@ define nginx::resource::vhost(
$proxy = undef, $proxy = undef,
$proxy_read_timeout = $nginx::params::nx_proxy_read_timeout, $proxy_read_timeout = $nginx::params::nx_proxy_read_timeout,
$index_files = ['index.html', 'index.htm', 'index.php'], $index_files = ['index.html', 'index.htm', 'index.php'],
$www_root = undef $www_root = undef,
$rewrite_www_to_non_www = false,
) { ) {
File { File {