Laravel forge is one of the best cloud management tools for PHP websites and websites in general. I use it all the time and it’s a time saver.

When you provision a new server it creates a default site with an index.php that displays your php information. I rather not have that exposed to anyone who visits my ip, so I wrote a recipe. Here is what you need to do:

  1. Log into Laravel Forge
  2. Click on Recipes
  3. Give it a name
  4. Select forge as the user
  5. Paste the below script
cd ~/default/public;echo "<?php header('HTTP/1.1 403 Forbidden'); ?>" > 'index.php'

You can select this when you provision or anytime to change it from displaying your server info to a forbidden message.