Last active
July 25, 2021 14:53
-
-
Save thomd/6c921a74eb57d5ee4cd347420ccef5bf to your computer and use it in GitHub Desktop.
Install Nginx on Azure VM #azure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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