Here’s a quick run-through the conf files available in this AMIs.
autorun.sh - This script will be executed at every boot, using the
adminuser. Keep in mind that the AMI will make read-only the file on every boot, and it will chown it to
admin. You’ll find this script useful if you want to execute some extra tasks after booting, such as collecting static files or maybe running migrations.
cron/* - This folder contains the usual
/etc/cron.*folders structure you’d expect to have. Scripts inside these folders (
weekly) will be copied to the corresponding folder in
/etc/cron.*. Note that file names should be LANANA-assigned namespace, aka
run-parts(8)compliant, aka only upper- and lower-case letters, digits, underscores and hyphens. They also must end with a new empty line.
global/hostname - Sets the hostname. Use any of the available variables:
Keep in mind that the value of the resulting string will be slugified according to **RFC 1123**, which means that only letters, digits and hyphens are allowed.
global/timezone - Sets the timezone. Use whatever you’d normally put in your
mail/msmtprc - You can configure an SMTP server which will be used to send alerts from Auditd, RKHunter, Fail2ban, etc…
mail/notifications - Write a single line containing a valid email address to which the alerts should be sent.
netdata/password - This is the file you’ll want to edit in order to change Netdata’s basic auth user/password. Use the usual command to generate a valid NGINX username and hash:
openssl passwd -apr1 netdata. The user/password in the demo AMI is
nginx/web.conf - This is the NGINX’s website configuration. It will listen by default on port 80, but there is a commented section in the configuration that will enable HTTPS using your certificates (nginx/helloworld.crt and nginx/helloworld.key).
php/wwwXY.conf - Those are the PHP-FPM pools configuration files. There is one configuration file per PHP version (
www56.confbelongs to the
www70.confbelongs to the
PHP-FPM 7.0server, and so on…). Each server is listening on port
PHP-FPM 5.6is listening on port
PHP-FPM 7.0is listening on port
3070, and so on… This is important as this is how you switch the PHP version in your application. You point NGINX’s
fastcgi_passoption to the port of the PHP-FPM localhost server you want to use (
PHP-FPM 7.0, and so on…).