Browse files

Removed cloud-init script for Wordpress to put into correct place

  • Loading branch information...
1 parent 290605f commit e07c170b40447438c32698d3a8296d8653403d18 @hspencer77 hspencer77 committed Mar 4, 2013
Showing with 0 additions and 66 deletions.
  1. +0 −66 cloud-init-lamp-wordpress.config
View
66 cloud-init-lamp-wordpress.config
@@ -1,66 +0,0 @@
-#cloud-config
-
-apt_update: true
-
-#apt_upgrade: true
-
-packages:
- - wordpress
- - mysql-server
- - apache2-mpm-prefork
- - php5
- - php5-mysql
- - libapache2-mod-php5
- - curl
- - postfix
- - mlocate
-
-configapache:
- - &config_apache |
- public_hostname=$(curl -s http://169.254.169.254/latest/meta-data/public-hostname)
- public_ipv4=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4)
- cat > /etc/apache2/sites-available/wordpress <<EOF
- <VirtualHost *:80>
- UseCanonicalName off
- Options All
- ServerAdmin webmaster@localhost
- ServerName $public_hostname
- ServerAlias $public_ipv4
-
- VirtualDocumentRoot /var/www/%0
- RewriteEngine on
- RewriteRule ^/wp-uploads/(.*)$ /var/www/wp-uploads/%{HTTP_HOST}/\$1
-
- ErrorLog \${APACHE_LOG_DIR}/wordpress-error.log
- LogLevel warn
- CustomLog \${APACHE_LOG_DIR}/wordpress-access.log combined
- </VirtualHost>
- EOF
- a2enmod rewrite vhost_alias
- a2ensite wordpress
-
-configpostfix:
- - &config_postfix |
- public_hostname=$(curl -s http://169.254.169.254/latest/meta-data/public-hostname)
- postconf -e myhostname=$public_hostname
- postconf -e mydestination=$public_hostname,localhost
- echo $public_hostname > /etc/mailname
- postfix reload
-
-configmysql:
- - &config_mysql |
- public_hostname=$(curl -s http://169.254.169.254/latest/meta-data/public-hostname)
- /etc/init.d/mysql restart
- bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress $public_hostname
- ln -s /usr/share/wordpress /var/www/$public_hostname
-
-restartapache:
- - &restart_apache |
- /etc/init.d/apache2 restart
-
-runcmd:
- - [ sh, -c, *config_postfix ]
- - [ sh, -c, *config_mysql ]
- - [ sh, -c, *config_apache ]
- - [ sh, -c, *restart_apache ]
- - touch /tmp/done

0 comments on commit e07c170

Please sign in to comment.