使用" httpd"厨师食谱,httpd在每次请求后被杀死

时间:2016-10-13 16:08:22

标签: apache centos chef chef-solo

我使用chef_solo使用bento/centos7.2配置了一个流浪者vm。我使用以下代码通过httpd cookbook安装httpd

# Install Apache and starts it
httpd_service 'mine' do
    mpm 'prefork'
    action [:create, :start]
    listen_ports ['80', '443']
    run_user node['webserver']['run_user'] # the value is 'vagrant'
end

# Add the site configuration
httpd_config 'mine' do
    instance 'mine'
    source 'mine.conf.erb'
    notifies :restart, 'httpd_service[mine]'
end

# Create document rood directory
directory "#{node['webserver']['document_root']}" do
    recursive true
end

# Homepage
template "#{node['webserver']['document_root']}/index.php" do
    source 'index.php.erb'
    mode '0644'
    owner node['webserver']['user']
    group node['webserver']['group']
    action :create_if_missing
end

# Install the mod_php Apache module.
httpd_module 'php' do
    instance 'mine'
end

# Install memcached
package 'memcached'

# Install php-pecl-memcache
package 'php-pecl-memcache' do
    action :install
    notifies :restart, 'httpd_service[mine]'
end

# Install php-pecl-memcached
package 'php-pecl-memcached' do
    action :install
    notifies :restart, 'httpd_service[mine]'
end

# Install php-mysql
package 'php-mysql' do
    action :install
    notifies :restart, 'httpd_service[mine]'
end

# Install php-pdo
package 'php-pdo' do
    action :install
    notifies :restart, 'httpd_service[mine]'
end

# Install php-intl
package 'php-intl' do
    action :install
    notifies :restart, 'httpd_service[mine]'
end

# Install php-mssql
package 'php-mssql' do
  action :install
  notifies :restart, 'httpd_service[mine]'
end

有趣的是,当我运行kitchen converge时,一切都很好,httpd完美无缺(InSpec测试通过,我手动验证kitchen login)。

但是当我在流浪汉上奔跑时,它从一开始就被杀死,并在每次请求后死亡。我不知道为什么,也不知道是否有任何我可以读取的日志来调试此行为。有什么想法吗?

UDPATE:

/var/log/httpd-mine/error_log

中找到了{p> This is the log sudo journalctl

中的

This is the log

0 个答案:

没有答案