Skip to content

Instantly share code, notes, and snippets.

@thomd
Last active July 25, 2021 14:53
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 thomd/6c921a74eb57d5ee4cd347420ccef5bf to your computer and use it in GitHub Desktop.
Save thomd/6c921a74eb57d5ee4cd347420ccef5bf to your computer and use it in GitHub Desktop.
Install Nginx on Azure VM #azure
#cloud-config
package_upgrade: true
packages:
- nginx
write_files:
- owner: www-data:www-data
path: /etc/nginx/sites-available/default
content: |
server {
listen 80;
listen [::]:80;
server_name example.ubuntu.com;
root /home/book_admin/web;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
runcmd:
- service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment