How does it work?

The AMI is designed in such a way that you only need to deal with one folder: /var/www/webapp. That folder will contain all your configuration files and your source code.

This is how the /var/www/webapp/ folder of your AMI should look like when you launch it:

├── conf
│   ├── autorun.sh
│   ├── cron
│   │   ├── d
│   │   ├── daily
│   │   ├── hourly
│   │   ├── monthly
│   │   └── weekly
│   ├── global
│   │   ├── hostname
│   │   └── timezone
│   ├── mail
│   │   ├── msmtprc
│   │   └── notifications
│   ├── netdata
│   │   └── password
│   ├── nginx
│   │   ├── helloworld.crt
│   │   ├── helloworld.key
│   │   └── web.conf
│   └── php
│       ├── www56.conf
│       ├── www70.conf
│       ├── www71.conf
│       ├── www72.conf
│       ├── www73.conf
│       └── www74.conf
└── src
    ├── app
    ├── artisan
    ├── bootstrap
    ├── composer.json
    ├── composer.lock
    ├── config
    ├── database
    ├── package.json
    ├── phpunit.xml
    ├── public
    ├── readme.md
    ├── resources
    ├── routes
    ├── server.php
    ├── storage
    ├── tests
    ├── vendor
    └── webpack.mix.js

You can check the contents of our Laravel demo project

Let’s start with the more obvious part, the src folder. This is the usual Laravel folder structure. If you have used Laravel before, the folder structure should look very familiar.

That said, let’s move on to the conf folder. That folder contains the configuration files for each service. You’ll be able to edit the behavior of all the services from here, without having to edit anything else. Just apply your changes and restart the services using the usual systemd commands or the additional CLI tools provided with this AMIs.