Skip to content

Instantly share code, notes, and snippets.

@XanderLuciano
Last active March 12, 2018 17:20
Show Gist options
  • Save XanderLuciano/a035a195a7988cc5aa85c6068f9c87cb to your computer and use it in GitHub Desktop.
Save XanderLuciano/a035a195a7988cc5aa85c6068f9c87cb to your computer and use it in GitHub Desktop.
For setting up an Ubunut 16.04 NGINX server.
#cloud-config
package_update: true
package_upgrade: true
packages:
- nginx
- git
users:
- name: xander
groups: sudo, www-data
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh-authorized-keys:
- ssh-rsa KEYGOESHERE
shell: /bin/bash
runcmd:
# Create root web directories
- mkdir /srv/dev
- mkdir /srv/staging
- mkdir /srv/production
- chown -R xander /srv
- chgrp -R www-data /srv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment