From cb4115edc59a1a006f5198063cf9dfb3d9ff38b7 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Tue, 9 Apr 2013 17:59:08 +0100 Subject: [PATCH] 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 --- templates/WordPress_2_Instances.template | 1 + templates/WordPress_2_Instances_With_EBS.template | 1 + templates/WordPress_2_Instances_With_EBS_EIP.template | 1 + templates/WordPress_And_Http.template | 1 + templates/WordPress_Composed_Instances.template | 1 + templates/WordPress_NoKey.template | 1 + templates/WordPress_Single_Instance.template | 1 + templates/WordPress_Single_Instance.yaml | 3 +++ templates/WordPress_Single_Instance_With_EBS.template | 1 + templates/WordPress_Single_Instance_With_EBS_EIP.template | 1 + templates/WordPress_Single_Instance_With_EIP.template | 1 + templates/WordPress_Single_Instance_With_HA.template | 1 + .../WordPress_Single_Instance_With_HA_AccessPolicy.template | 1 + templates/WordPress_Single_Instance_With_IHA.template | 1 + templates/WordPress_Single_Instance_With_Quantum.template | 1 + templates/WordPress_Single_Instance_gold.template | 1 + templates/WordPress_With_LB.template | 1 + templates/WordPress_With_RDS.template | 1 + 18 files changed, 20 insertions(+) diff --git a/templates/WordPress_2_Instances.template b/templates/WordPress_2_Instances.template index 427ae972..195401a2 100644 --- a/templates/WordPress_2_Instances.template +++ b/templates/WordPress_2_Instances.template @@ -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" ]]}} diff --git a/templates/WordPress_2_Instances_With_EBS.template b/templates/WordPress_2_Instances_With_EBS.template index 968b0aad..5d3c93d0 100644 --- a/templates/WordPress_2_Instances_With_EBS.template +++ b/templates/WordPress_2_Instances_With_EBS.template @@ -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" ]]}} diff --git a/templates/WordPress_2_Instances_With_EBS_EIP.template b/templates/WordPress_2_Instances_With_EBS_EIP.template index c6c31983..bf3533d9 100644 --- a/templates/WordPress_2_Instances_With_EBS_EIP.template +++ b/templates/WordPress_2_Instances_With_EBS_EIP.template @@ -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" ]]}} diff --git a/templates/WordPress_And_Http.template b/templates/WordPress_And_Http.template index 96573e7d..9a1adca8 100644 --- a/templates/WordPress_And_Http.template +++ b/templates/WordPress_And_Http.template @@ -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" }, diff --git a/templates/WordPress_Composed_Instances.template b/templates/WordPress_Composed_Instances.template index 77f31d47..b8519317 100644 --- a/templates/WordPress_Composed_Instances.template +++ b/templates/WordPress_Composed_Instances.template @@ -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" ]]}} diff --git a/templates/WordPress_NoKey.template b/templates/WordPress_NoKey.template index b9f2f925..f836c14b 100644 --- a/templates/WordPress_NoKey.template +++ b/templates/WordPress_NoKey.template @@ -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" ]]}} diff --git a/templates/WordPress_Single_Instance.template b/templates/WordPress_Single_Instance.template index da2b379f..3d794302 100644 --- a/templates/WordPress_Single_Instance.template +++ b/templates/WordPress_Single_Instance.template @@ -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" ]]}} diff --git a/templates/WordPress_Single_Instance.yaml b/templates/WordPress_Single_Instance.yaml index 2990c66d..eed4fcf0 100644 --- a/templates/WordPress_Single_Instance.yaml +++ b/templates/WordPress_Single_Instance.yaml @@ -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} diff --git a/templates/WordPress_Single_Instance_With_EBS.template b/templates/WordPress_Single_Instance_With_EBS.template index a8343988..dbb51132 100644 --- a/templates/WordPress_Single_Instance_With_EBS.template +++ b/templates/WordPress_Single_Instance_With_EBS.template @@ -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" ]]}} diff --git a/templates/WordPress_Single_Instance_With_EBS_EIP.template b/templates/WordPress_Single_Instance_With_EBS_EIP.template index 21fa1d38..1cd3c468 100644 --- a/templates/WordPress_Single_Instance_With_EBS_EIP.template +++ b/templates/WordPress_Single_Instance_With_EBS_EIP.template @@ -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" ]]}} diff --git a/templates/WordPress_Single_Instance_With_EIP.template b/templates/WordPress_Single_Instance_With_EIP.template index e2dcbf83..bfe1d68b 100644 --- a/templates/WordPress_Single_Instance_With_EIP.template +++ b/templates/WordPress_Single_Instance_With_EIP.template @@ -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" ]]}} diff --git a/templates/WordPress_Single_Instance_With_HA.template b/templates/WordPress_Single_Instance_With_HA.template index f31bcc76..b3a96bfb 100644 --- a/templates/WordPress_Single_Instance_With_HA.template +++ b/templates/WordPress_Single_Instance_With_HA.template @@ -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" }, diff --git a/templates/WordPress_Single_Instance_With_HA_AccessPolicy.template b/templates/WordPress_Single_Instance_With_HA_AccessPolicy.template index 69ddb82b..36d0603a 100644 --- a/templates/WordPress_Single_Instance_With_HA_AccessPolicy.template +++ b/templates/WordPress_Single_Instance_With_HA_AccessPolicy.template @@ -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" }, diff --git a/templates/WordPress_Single_Instance_With_IHA.template b/templates/WordPress_Single_Instance_With_IHA.template index 7f715caa..132bd380 100644 --- a/templates/WordPress_Single_Instance_With_IHA.template +++ b/templates/WordPress_Single_Instance_With_IHA.template @@ -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" }, diff --git a/templates/WordPress_Single_Instance_With_Quantum.template b/templates/WordPress_Single_Instance_With_Quantum.template index 04a9c37e..049dfbe8 100644 --- a/templates/WordPress_Single_Instance_With_Quantum.template +++ b/templates/WordPress_Single_Instance_With_Quantum.template @@ -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" ]]}} diff --git a/templates/WordPress_Single_Instance_gold.template b/templates/WordPress_Single_Instance_gold.template index f7690b74..c5205453 100644 --- a/templates/WordPress_Single_Instance_gold.template +++ b/templates/WordPress_Single_Instance_gold.template @@ -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" ]]}} diff --git a/templates/WordPress_With_LB.template b/templates/WordPress_With_LB.template index 7616779c..df37dd8c 100644 --- a/templates/WordPress_With_LB.template +++ b/templates/WordPress_With_LB.template @@ -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" }, diff --git a/templates/WordPress_With_RDS.template b/templates/WordPress_With_RDS.template index 9884e88d..d8a917e9 100644 --- a/templates/WordPress_With_RDS.template +++ b/templates/WordPress_With_RDS.template @@ -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" ]]}} -- 2.45.2