heat templates : Update Wordpress config for F18 guests

F18 contains apache 2.4 which requires a different syntax to enable
non-local access to the wordpress install

fixes bug #1166897

Change-Id: Ia63cceeba35904f05a1b4cf76fc075d3cdc7cd86
This commit is contained in:
Steven Hardy 2013-04-09 17:59:08 +01:00
parent 092222de42
commit cb4115edc5
18 changed files with 20 additions and 0 deletions

View File

@ -161,6 +161,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ --e s/localhost/", { "Fn::GetAtt" : [ "DatabaseServer", "PublicIp" ]}, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -195,6 +195,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ --e s/localhost/", { "Fn::GetAtt" : [ "WikiDatabase", "PublicIp" ]}, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -231,6 +231,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ --e s/localhost/", { "Ref" : "DatabaseIPAddress" }, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -117,6 +117,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref": "DBName" },
"/ --e s/username_here/", { "Ref": "DBUsername" },
"/ --e s/password_here/", { "Ref": "DBPassword" },

View File

@ -137,6 +137,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ --e s/localhost/", { "Fn::GetAtt" : [ "DatabaseTemplate", "Outputs.PublicIp" ]}, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -127,6 +127,7 @@
"EOF\n",
"cat /tmp/mysql-wordpress-config | mysql -u root --password='", { "Ref" : "DBRootPassword" }, "' < /tmp/mysql-wordpress-config\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"cp /usr/share/wordpress/wp-config.php /usr/share/wordpress/wp-config.orig\n"
]]}}

View File

@ -132,6 +132,7 @@
"EXIT\n",
"EOF\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -133,6 +133,9 @@ Resources:
'
- 'sed -i "/Deny from All/d" /etc/httpd/conf.d/wordpress.conf
'
- 'sed -i "s/Require local/Require all granted/" /etc/httpd/conf.d/wordpress.conf
'
- sed --in-place --e s/database_name_here/
- {Ref: DBName}

View File

@ -157,6 +157,7 @@
"EXIT\n",
"EOF\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -181,6 +181,7 @@
"EXIT\n",
"EOF\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -157,6 +157,7 @@
"EXIT\n",
"EOF\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -254,6 +254,7 @@
"' < /tmp/setup.mysql || error_exit 'Failed to create database.'\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" },
"/ --e s/username_here/", { "Ref" : "DBUsername" },
"/ --e s/password_here/", { "Ref" : "DBPassword" },

View File

@ -263,6 +263,7 @@
"' < /tmp/setup.mysql || error_exit 'Failed to create database.'\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" },
"/ --e s/username_here/", { "Ref" : "DBUsername" },
"/ --e s/password_here/", { "Ref" : "DBPassword" },

View File

@ -229,6 +229,7 @@
"' < /tmp/setup.mysql || error_exit 'Failed to create database.'\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" },
"/ --e s/username_here/", { "Ref" : "DBUsername" },
"/ --e s/password_here/", { "Ref" : "DBPassword" },

View File

@ -172,6 +172,7 @@
"EXIT\n",
"EOF\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}

View File

@ -133,6 +133,7 @@
"EOF\n",
"cat /tmp/mysql-wordpress-config | mysql -u root --password='", { "Ref" : "DBRootPassword" }, "' < /tmp/mysql-wordpress-config\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n",
"cp /usr/share/wordpress/wp-config.php /usr/share/wordpress/wp-config.orig\n"
]]}}

View File

@ -137,6 +137,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref": "DBName" },
"/ --e s/username_here/", { "Ref": "DBUsername" },
"/ --e s/password_here/", { "Ref": "DBPassword" },

View File

@ -152,6 +152,7 @@
"#!/bin/bash -v\n",
"/opt/aws/bin/cfn-init\n",
"sed -i \"/Deny from All/d\" /etc/httpd/conf.d/wordpress.conf\n",
"sed -i \"s/Require local/Require all granted/\" /etc/httpd/conf.d/wordpress.conf\n",
"sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ --e s/localhost/", { "Fn::GetAtt" : [ "DatabaseServer", "Endpoint.Address" ]}, "/ /usr/share/wordpress/wp-config.php\n",
"systemctl restart httpd.service\n"
]]}}