diff --git a/site-cookbooks/kosmos_openresty/recipes/default.rb b/site-cookbooks/kosmos_openresty/recipes/default.rb index d2f6f03..ab845b1 100644 --- a/site-cookbooks/kosmos_openresty/recipes/default.rb +++ b/site-cookbooks/kosmos_openresty/recipes/default.rb @@ -5,3 +5,8 @@ # Install openresty from official packages include_recipe 'openresty::apt_package' + +openresty_site 'hello_world' do + template 'hello_world.conf.erb' + action :enable +end diff --git a/site-cookbooks/kosmos_openresty/templates/hello_world.conf.erb b/site-cookbooks/kosmos_openresty/templates/hello_world.conf.erb new file mode 100644 index 0000000..cf14959 --- /dev/null +++ b/site-cookbooks/kosmos_openresty/templates/hello_world.conf.erb @@ -0,0 +1,9 @@ +server { + listen 80 reuseport; + location / { + default_type text/plain; + content_by_lua_block { + ngx.say("Hello World") + } + } +}