nginx
chef solo入門勉強中ninxが立ち上がらなかったので調査
ちなみにosはubunts
まずは構文チェック
/usr/sbin/nginx -t
/usr/sbin/nginx -t -c /etc/nginx/nginx.conf
ほんでuserの値とかチェック
http://blog.infinity-dimensions.com/2012/07/ubuntu-nginx-config-setting.html
これが正解
vim site-cookbooks/nginx/templates/default/nginx.conf.erb
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen <%= node['nginx']['port'] %>;
server_name localhost;
location / {
root /usr/share/nginx/www;
index index.html index.htm;
}
}
}
おまけ
package "nginx" do
action :install
end
service "nginx" do
supports :status => true, :restart => true, :reload => true
action [:enable, :start]
end
vim site-cookbooks/nginx/recipes/default.rb
template "nginx.conf" do
path "/etc/nginx/nginx.conf"
source "nginx.conf.erb"
owner "root"
group "root"
mode 0644
notifies :reload, 'service[nginx]'
end
なんかいつか参考になるかな
http://k-mats.github.io/blog/2013/04/12/no-network-on-vagrant/
[Mac]『入門Chef Solo』を読んで試してみた
http://blog.hello-world.jp.net/?p=461
自分の中でブレイクしている、vagrant + chef + gitで開発環境を構築する
http://box406.hatenablog.com/entry/2013/06/01/010715
「写経」から始めるChefクックブックの作成
http://heartbeats.jp/hbblog/2013/03/chef-recipe-and-lib.html