Update cookbooks and add wordpress cookbook
This commit is contained in:
21
cookbooks/wordpress/templates/default/nginx.conf.erb
Normal file
21
cookbooks/wordpress/templates/default/nginx.conf.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
server {
|
||||
listen <%= @server_port %>;
|
||||
server_name <%= @server_name %> <%= @server_aliases.join(" ") %>;
|
||||
|
||||
access_log /var/log/nginx/<%= @server_name %>.access.log;
|
||||
error_log /var/log/nginx/<%= @server_name %>.error.log;
|
||||
|
||||
root <%= @docroot %>;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_param SCRIPT_FILENAME <%= @docroot %>$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
31
cookbooks/wordpress/templates/default/wordpress.conf.erb
Normal file
31
cookbooks/wordpress/templates/default/wordpress.conf.erb
Normal file
@@ -0,0 +1,31 @@
|
||||
<VirtualHost *:<%= @params[:server_port] %>>
|
||||
ServerName <%= @params[:server_name] %>
|
||||
ServerAlias <% @params[:server_aliases].each do |a| %><%= a %> <% end %>
|
||||
DocumentRoot <%= @params[:docroot] %>
|
||||
|
||||
<Directory <%= @params[:docroot] %>>
|
||||
Options FollowSymLinks
|
||||
AllowOverride FileInfo Options
|
||||
<% if node['apache']['version'] == '2.4' %>
|
||||
Require all granted
|
||||
<% else %>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
<% end %>
|
||||
</Directory>
|
||||
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
LogLevel info
|
||||
ErrorLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-error.log
|
||||
CustomLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-access.log combined
|
||||
|
||||
RewriteEngine On
|
||||
<% unless node['apache']['version'] == '2.4' %>
|
||||
RewriteLog <%= node['apache']['log_dir'] %>/<%= @application_name %>-rewrite.log
|
||||
RewriteLogLevel 0
|
||||
<% end %>
|
||||
</VirtualHost>
|
||||
99
cookbooks/wordpress/templates/default/wp-config.php.erb
Normal file
99
cookbooks/wordpress/templates/default/wp-config.php.erb
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* The base configurations of the WordPress.
|
||||
*
|
||||
* This file has the following configurations: MySQL settings, Table Prefix,
|
||||
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
|
||||
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
|
||||
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
|
||||
*
|
||||
* This file is used by the wp-config.php creation script during the
|
||||
* installation. You don't have to use the web site, you can just copy this file
|
||||
* to "wp-config.php" and fill in the values.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
// ** MySQL settings - You can get this info from your web host ** //
|
||||
/** The name of the database for WordPress */
|
||||
define('DB_NAME', '<%= @db_name %>');
|
||||
|
||||
/** MySQL database username */
|
||||
define('DB_USER', '<%= @db_user %>');
|
||||
|
||||
/** MySQL database password */
|
||||
define('DB_PASSWORD', '<%= @db_password %>');
|
||||
|
||||
/** MySQL hostname */
|
||||
define('DB_HOST', '<%= @db_host %>');
|
||||
|
||||
/** Database Charset to use in creating database tables. */
|
||||
define('DB_CHARSET', '<%= @db_charset %>');
|
||||
|
||||
/** The Database Collate type. Don't change this if in doubt. */
|
||||
define('DB_COLLATE', '<%= @db_collate %>');
|
||||
|
||||
/**#@+
|
||||
* Authentication Unique Keys and Salts.
|
||||
*
|
||||
* Change these to different unique phrases!
|
||||
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
|
||||
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
define('AUTH_KEY', '<%= @auth_key %>');
|
||||
define('SECURE_AUTH_KEY', '<%= @secure_auth_key %>');
|
||||
define('LOGGED_IN_KEY', '<%= @logged_in_key %>');
|
||||
define('NONCE_KEY', '<%= @nonce_key %>');
|
||||
define('AUTH_SALT', '<%= @auth_salt %>');
|
||||
define('SECURE_AUTH_SALT', '<%= @secure_auth_salt %>');
|
||||
define('LOGGED_IN_SALT', '<%= @logged_in_salt %>');
|
||||
define('NONCE_SALT', '<%= @nonce_salt %>');
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* WordPress Database Table prefix.
|
||||
*
|
||||
* You can have multiple installations in one database if you give each a unique
|
||||
* prefix. Only numbers, letters, and underscores please!
|
||||
*/
|
||||
$table_prefix = '<%= @db_prefix %>';
|
||||
|
||||
/**
|
||||
* WordPress Localized Language, defaults to English.
|
||||
*
|
||||
* Change this to localize WordPress. A corresponding MO file for the chosen
|
||||
* language must be installed to wp-content/languages. For example, install
|
||||
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
|
||||
* language support.
|
||||
*/
|
||||
define('WPLANG', '<%= @lang %>');
|
||||
|
||||
/**
|
||||
* For developers: WordPress debugging mode.
|
||||
*
|
||||
* Change this to true to enable the display of notices during development.
|
||||
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||
* in their development environments.
|
||||
*/
|
||||
define('WP_DEBUG', false);
|
||||
|
||||
<% if @allow_multisite %>
|
||||
/* Multisite */
|
||||
define( 'WP_ALLOW_MULTISITE', true );
|
||||
<% end %>
|
||||
|
||||
<% @wp_config_options.each do |key,value| %>
|
||||
define( '<%= key %>', <%= value %> );
|
||||
<% end %>
|
||||
|
||||
/* That's all, stop editing! Happy blogging. */
|
||||
|
||||
/** Absolute path to the WordPress directory. */
|
||||
if ( !defined('ABSPATH') )
|
||||
define('ABSPATH', dirname(__FILE__) . '/');
|
||||
|
||||
/** Sets up WordPress vars and included files. */
|
||||
require_once(ABSPATH . 'wp-settings.php');
|
||||
Reference in New Issue
Block a user