当我从puppet配置apache时,我进入了apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
我该如何改变?我的主人在/ var / otherdir /并且无法工作。
我的木偶初始文件
class apache
{
package
{
"apache2":
ensure => present,
require => [Exec['apt-get update'], Package['php5'], Package['php5-dev'], Package['php5-cli']]
}
service
{
"apache2":
ensure => running,
enable => true,
require => Package['apache2'],
subscribe => [
File["/etc/apache2/mods-enabled/rewrite.load"],
File["/etc/apache2/sites-available/000-default.conf"],
File["/etc/apache2/conf-enabled/phpmyadmin.conf"]
],
}
file
{
"/etc/apache2/mods-enabled/rewrite.load":
ensure => link,
target => "/etc/apache2/mods-available/rewrite.load",
require => Package['apache2'],
}
file
{
"/etc/apache2/sites-available/000-default.conf":
ensure => present,
owner => root, group => root,
source => "/vagrant/puppet/templates/vhost",
require => Package['apache2'],
}
exec
{
'echo "ServerName localhost" | sudo tee /etc/apache2/conf-enabled/fqdn.conf':
require => Package['apache2'],
}
}
答案 0 :(得分:1)
为/etc/apache2/apache2.conf
添加需要包Apache2
获取一个有效的apache2.conf并将其放入模块文件部分