This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: apache | |
# Recipe:: default | |
# | |
# Copyright 2014, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
package "httpd" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'mailx::default' do | |
context 'on Debian' do | |
let(:chef_run) { ChefSpec::Runner.new({:platform => 'ubuntu', :version => '14.04'}).converge(described_recipe) } | |
it 'should install the correct packages' do | |
expect(chef_run).to install_package 'mailutils' | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: apache | |
# Recipe:: default | |
# | |
# Copyright 2013, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
package "httpd" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node.default['haproxy']['members'] = [{ | |
"hostname" => "localhost", | |
"ipaddress" => "127.0.0.1", | |
"port" => node["myapache"]["port"], | |
"ssl_port" => node["myapache"]["port"] | |
}] | |
node.default['haproxy']['admin']['address_bind'] = "0.0.0.0" | |
node.default['haproxy']['admin']['port'] = 8082 | |
node.default['haproxy']['enable_stats_socket'] = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerTokens OS | |
ServerRoot "/etc/httpd" | |
PidFile run/httpd.pid | |
Timeout 60 | |
KeepAlive Off | |
MaxKeepAliveRequests 100 | |
KeepAliveTimeout 15 | |
<IfModule prefork.c> | |
StartServers 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: myapache | |
# Recipe:: default | |
# | |
# Copyright (c) 2014 The Authors, All Rights Reserved. | |
# | |
package "httpd" | |
execute "mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.disabled" do | |
only_if do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if @port != 80 -%> | |
Listen <%= @port %> | |
<% end -%> | |
<VirtualHost *:<%= @port %>> | |
ServerAdmin webmaster@localhost | |
DocumentRoot <%= @document_root %> | |
<Directory /> | |
Options FollowSymLinks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: apache | |
# Recipe:: default | |
# | |
# Copyright (c) 2014 The Authors, All Rights Reserved. | |
# | |
package "httpd" | |
service "httpd" do | |
action [ :enable, :start ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: myapache | |
# Recipe:: default | |
# | |
# Copyright (c) 2014 The Authors, All Rights Reserved. | |
# | |
package "httpd" | |
execute "mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.disabled" do | |
only_if do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if @port != 80 -%> | |
Listen <%= @port %> | |
<% end -%> | |
<VirtualHost *:<%= @port %>> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html/web01 | |
<Directory /> | |
Options FollowSymLinks |