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 d0c51e1281
1 changed files with 9 additions and 3 deletions

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/paste']],
proxyexclusions => ['/robots.txt'],
docroot => "/srv/www/${name}/"
}
file { "/etc/init/${name}-paste.conf":
@ -56,13 +57,18 @@ define lodgeit::site(
}
if $robotstxt {
file { "/srv/lodgeit/${name}/robots.txt":
file { ['/srv/www', '/srv/www/paste']:
ensure => directory,
}
file { '/srv/www/paste/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/paste'],
}
}
cron { "update_backup_${name}":