Let Apache know where to serve robots.txt from

Install robots.txt to its own directory, and set Apache's
DocumentRoot to that.

Change-Id: I753e5c766e505f6dd0325becbd67165a0315f402
Depends-On: I1c5fe6f73b5983886578975e89c5e4148b506795
This commit is contained in:
Clint Adams 2015-10-06 16:06:03 -04:00
parent 283fa23e56
commit 68b17a8fba

View File

@ -16,8 +16,9 @@ define lodgeit::site(
::httpd::vhost::proxy { $vhost_name:
port => 80,
dest => "http://localhost:${port}",
require => File["/srv/lodgeit/${name}"],
require => [File["/srv/lodgeit/${name}"], File["/srv/www/${name}"]],
proxyexclusions => ['/robots.txt'],
docroot => "/srv/www/${name}/"
}
file { "/etc/init/${name}-paste.conf":
@ -56,13 +57,19 @@ define lodgeit::site(
}
if $robotstxt {
file { "/srv/lodgeit/${name}/robots.txt":
file { "/srv/www/${name}":
ensure => directory,
recurse => true,
}
file { "/srv/www/${name}/robots.txt":
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/lodgeit/robots.txt',
require => File["/srv/lodgeit/${name}/"],
require => File["/srv/www/${name}/"],
}
}
cron { "update_backup_${name}":