Skip to content

Instantly share code, notes, and snippets.

@kolber
Last active May 24, 2017 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolber/bf7d5b5556dbeb7962a5fd5692878e84 to your computer and use it in GitHub Desktop.
Save kolber/bf7d5b5556dbeb7962a5fd5692878e84 to your computer and use it in GitHub Desktop.
#cloud-config
apt_update: true
packages:
- apache2
- php
- libapache2-mod-php7.0
- php-mbstring
- php7.0-curl
- php7.0-zip
- php7.0-json
- php7.0-xml
- php7.0-gd
- zip
- unzip
- wget
write_files:
- path: /etc/apache2/sites-available/000-default.conf
content: |
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html>
AllowOverride All
</Directory>
</VirtualHost>
- path: /var/www/html/index.php
content: |
<?php phpinfo(); ?>
runcmd:
- a2enmod rewrite
- sed -i -e "s/index.html index.cgi index.pl index.php/index.php index.html index.cgi index.pl/" /etc/apache2/mods-enabled/dir.conf
- service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment