Installation of Mautic v5 on Proxmox Server with Ubuntu 24 CT

My Mautic version is: 5.1.0
My PHP version is: 8.1
My Database type and version is: mariaDB

Your problem
My problem is: I had a prefect run to install the Mautic v5 following the TuT by @joeyk a big thanks and shout-out to him.

I ran into a few issues, which I want to highlight a few tips for others how may face similar issues.
sudo apt install composer failed due to error of timezone.

Steps I have tried to fix the problem:

I would like to share the steps I followed to resolve some issues I encountered while setting up Mautic V5. These steps were primarily based on the excellent guidance provided by @joeyk the TuT Blog and in various posts on the forum.

1. Tweaking PHP Settings:

I followed the PHP setup instructions provided in the tutorial, and additionally adjusted the date.timezone setting in the loaded php.ini file:

php -i | grep php.ini

This returned:

Configuration File (php.ini) Path => /etc/php/8.1/cli
Loaded Configuration File => /etc/php/8.1/cli/php.ini

I then modified the date.timezone directive as needed and restarted the Apache service:

sudo systemctl restart apache2.service

Next, I installed Composer without any issues this time by running:

sudo apt install composer

2. Email Setup (Step 4):

Rather than continuing with Step 4 in the tutorial, I followed @joeyk’s latest blog Mautic v5 Everything About Email Setup on email setup for Mautic V5. I installed the etailors_amazon_ses plugin by manually uploading the necessary files to the AmazonSesBundle directory, as instructed.

3. Enabling SFTP for File Uploads:

To upload the required files, I had to enable SFTP on my server. This was done by modifying the SSH configuration:

sudo nano /etc/ssh/sshd_config

I found the line:

PermitRootLogin no
and changed it to 
PermitRootLogin yes

After making this change, I restarted the SSH service:

sudo service ssh restart

4. Handling Site URL and Cache Issues:

In previous installations of Mautic V4, I had switched the “Site URL” from http to https. However, if you have changed the URL to https and then clear the cache with:

sudo -u www-data php bin/console cache:clear

You might encounter an issue where the cache doesn’t rebuild properly.??? to webpage does not load “to many redirects” To resolve this, I had to manually edit the config/local.php file and revert the URL to http:

$parameters = array(
    'site_url' => 'http://mymautic.mydomain.com',
);

After this, I restarted the VM and ran the cache clear command again:

sudo -u www-data php bin/console cache:clear

In one of his posts, @joeyk suggested adding the following line to the index.php file to avoid redirect loops, though I have not yet confirmed if this step is necessary in my setup:

<?php
$_SERVER['HTTPS'] = 'on';

Thanks once again to @joeyk for the valuable posts and tutorials. Without your guidance, I would have faced significant challenges in getting Mautic V4 and V5 running successfully.

I hope this summary helps anyone encountering similar issues.

Best Regards,
Srikanth Kamath

Root login? Don’t do that…

PermitRootLogin yes
and changed it to 
PermitRootLogin no