Posted under » PHP » MySQL » AL2023 on 25 August 2026
Continue from Apache in Amazon Linux 2023... you can read AWS docu on how to install LAMP in AL2023.
If you need to render PHP you need to put this on your apache config.
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
Although can now run or render php files, the index in the directory is still html. So do enable .php as index in a directory.
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm
</IfModule>
Now let us move to MySQL. To get the default root password in AL2023,
$ grep 'temporary password' /var/log/mysqld.log
With that you can set your own root password. You might encounter 'Your password does not satisfy the current policy requirements'.
Best that you stick to it instead of loosening the policy.