Skip to content

Instantly share code, notes, and snippets.

@chumaumenze
Last active June 23, 2024 01:11
Show Gist options
  • Save chumaumenze/a3fbbc89e9cc2438ebcc9f963204113f to your computer and use it in GitHub Desktop.
Save chumaumenze/a3fbbc89e9cc2438ebcc9f963204113f to your computer and use it in GitHub Desktop.
Azure Resource Deployment Ping Script
#!/bin/bash -xe
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
# Install Apache and PHP
apt install -y apache2 php libapache2-mod-php
mv /var/www/html/index.html /var/www/html/index.orig.html
echo "<h1>Azure Resource Deployment confirmed.</h1>
<p>I am responding from <?php echo $_SERVER['SERVER_NAME']; ?></p>
<?php phpinfo(); ?>" >> /var/www/html/index.php
#restart apache
service apache2 reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment