Last active
October 23, 2018 17:58
-
-
Save mtjakobczyk/b6ce288ea3e7442b62fc9f8d4c2e5db7 to your computer and use it in GitHub Desktop.
Cloud-config for a nginx with sample custom page
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 | |
| write_files: | |
| - content: | | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
| <head> | |
| <title>Nginx HTTP Server on Oracle Cloud Infrastructure</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| </head> | |
| <body> | |
| <div>Welcome to <b>nginx</b> on Oracle Cloud Infrastructure!</div> | |
| </body> | |
| </html> | |
| owner: opc:opc | |
| path: /home/opc/index.html | |
| runcmd: | |
| - /bin/yum install -y nginx | |
| - /bin/systemctl start nginx | |
| - /bin/firewall-offline-cmd --add-port=80/tcp | |
| - /bin/systemctl restart firewalld | |
| - cp /usr/share/nginx/html/index.html /usr/share/nginx/html/index.original.html | |
| - cat /home/opc/index.html > /usr/share/nginx/html/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment