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
This commit is contained in:
Clint Adams 2015-10-06 16:06:03 -04:00
parent 283fa23e56
commit 7a03ae7eb1
1 changed files with 8 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/${name}"]],
proxyexclusions => ['/robots.txt'],
docroot => "/srv/www/${name}/"
}
file { "/etc/init/${name}-paste.conf":
@ -55,14 +56,18 @@ define lodgeit::site(
content => template('lodgeit/layout.html.erb'),
}
file { ['/srv/www', "/srv/www/${name}"]:
ensure => directory,
}
if $robotstxt {
file { "/srv/lodgeit/${name}/robots.txt":
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}":