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:
parent
092222de42
commit
cb4115edc5
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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" },
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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" },
|
||||
|
@ -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" },
|
||||
|
@ -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" },
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
@ -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" },
|
||||
|
@ -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"
|
||||
]]}}
|
||||
|
Loading…
Reference in New Issue
Block a user