Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add phpmyadmin recipe.
  • Loading branch information
Tavish Armstrong committed Dec 23, 2011
1 parent 15ada26 commit ff1018a
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 0 deletions.
8 changes: 8 additions & 0 deletions phpmyadmin/README.rdoc
@@ -0,0 +1,8 @@
= DESCRIPTION:

= REQUIREMENTS:

= ATTRIBUTES:

= USAGE:

38 changes: 38 additions & 0 deletions phpmyadmin/metadata.json
@@ -0,0 +1,38 @@
{
"conflicting": {
},
"long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n",
"description": "Installs/Configures phpmyadmin",
"providing": {
},
"recipes": {
},
"maintainer": "MoJo Code",
"attributes": {
},
"replacing": {
},
"dependencies": {
"php": [

],
"mysql": [

],
"apache2": [

]
},
"maintainer_email": "yabawock@gmail.com",
"groupings": {
},
"recommendations": {
},
"platforms": {
},
"version": "0.0.1",
"license": "Apache 2.0",
"name": "phpmyadmin",
"suggestions": {
}
}
9 changes: 9 additions & 0 deletions phpmyadmin/metadata.rb
@@ -0,0 +1,9 @@
maintainer "MoJo Code"
maintainer_email "yabawock@gmail.com"
license "Apache 2.0"
description "Installs/Configures phpmyadmin"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.0.1"
depends "apache2"
depends "mysql"
depends "php"
30 changes: 30 additions & 0 deletions phpmyadmin/recipes/default.rb
@@ -0,0 +1,30 @@
#
# Cookbook Name:: phpmyadmin
# Recipe:: default
#
# Copyright 2010, MoJo Code
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

include_recipe "apache2::default"
include_recipe "mysql::server"
include_recipe "php"

package "phpmyadmin" do
action :upgrade
end

link "/etc/apache2/conf.d/phpmyadmin" do
to "/etc/phpmyadmin/apache.conf"
end
40 changes: 40 additions & 0 deletions phpmyadmin/templates/default/apache.conf.erb
@@ -0,0 +1,40 @@
# phpMyAdmin default Apache configuration
# Managed by chef for <%= node[:hostname] %>

Alias /phpmonadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php5.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>

0 comments on commit ff1018a

Please sign in to comment.