Getting the error 404 when doing the test callback to URL in the email monitor


My environment:

Server: Digital Ocean droplet
OS: Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-51-generic x86_64)
PHP: (cli) (built: Dec 26 2020 10:32:51) ( NTS )
DB: mysql Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Server: Apache/2.4.41 (Ubuntu)
Mautic: 3.2.5

My problem:

Mautic is normally working but I can not set up for SendGrid callback. I get the error 404 when trying the test callback URL.
Example with cURL request:

curl -I

returns this message:

HTTP/1.1 404 Not Found
Date: Thu, 04 Feb 2021 08:26:32 GMT
Server: Apache/2.4.41 (Ubuntu)
Set-Cookie: 935af385425ce4df78a248e69761515d=ckt2gl1od8lkag30gvot4njjbm; path=/; secure; HttpOnly
Cache-Control: max-age=0, must-revalidate, private
Expires: Thu, 04 Feb 2021 08:26:32 GMT
Content-Type: text/html; charset=UTF-8

The same message returns for all other callback URLs:

  • /mailer/elasticemail/callback
  • /mailer/amazon_api/callback
  • /mailer/mandrill/callback
  • etc.

No errors in /var/log/apache2/error.log

/var/log/apache2/access.log contains such messages:
“POST /mailer/sendgrid_api/callback HTTP/1.1” 404 65014 “-” “SendGrid Event API”

.httaccess exists and has a default configuration.
site_url configured and HTTPS enforced.

What I tried to do:

  1. Searching by forum;
  2. Searching by issues of Github repo;
  3. Googled.

I will be very appreciative of any help/advice. Thanks for your attention.