Chef cookbook that provides a LWRP for WordPress Nginx sites with PHP-FPM. Provides a base Nginx config for common WordPress settings at /etc/nginx/wordpress.conf.
node['wordpress_nginx']['fastcgi_read_timeout']- Timeout for reading a response from the FastCGI server (default=3600s)node['wordpress_nginx']['static_file_expiry']- Expiry time for static assetsjs|css|png|jpg|jpeg|gif|ico(default=24h)node['wordpress_nginx']['php_fpm']['listen']- Listen socket for PHP-FPM (default=/var/run/php-fpm-www.sock)
Basic usage with only host and document root:
wordpress_nginx_site 'example.com' do
host 'example.com'
root '/srv/www/example.com'
endThis resource would create an Nginx site at /etc/nginx/sites-available/example.com and enable it.
If you need to add additional custom config options, you can use the code attribute:
wordpress_nginx_site 'example.com' do
host 'example.com'
root '/srv/www/example.com'
code "include #{node['nginx']['dir']}/custom.conf;"
notifies :reload, 'service[nginx]'
end- [2013-01-08] Removed usage of
node['php-fpm']['pool']['www']['listen']attribute (removed from php-fpm cookbook as of 0.6.3). Replaced with local attributenode['wordpress_nginx']['php_fpm']['listen'].
- Fork the repository
- Create a named feature branch (like
add_component_x) - Commit your changes
- Submit a pull request
See LICENSE