Your software
My Mautic version is: 4.43
My PHP version is: 7.4
My Database type and version is: MariaDB 10.3
Your problem
Hi,
I’m very new to Mautic and try to get it working with my nginx configuration. I have most things working, but seems like my images / assets are not configured correctly. I’m using the Paprika email template and I don’t see the images load properly when the URL looks like - https://mdev.com/index.php/themes/paprika/assets/paprikas.jpg?vb5bfa802
However, if I remove the index.php
the image loads fine but it does not show up as page hit when the email is opened by the client.
``https://mdev.com/themes/paprika/assets/paprikas.jpg?vb5bfa802`
Q1: Is this https://mdev.com/index.php/themes/paprika/assets/paprikas.jpg?vb5bfa802
supposed to work? I couldn’t find any examples for nginx configuration, so any pointers would be helpful. I’m attaching my configuration for reference.
Q2: Another issue in the same email is I don’t see links being tracked, even though the default configuration does seem to have link tracking enabled. Is there anything extra I need to do to track emails?
nginx.conf.template
server {
listen 80;
listen [::]:80;
server_name ${HOST};
location / {
rewrite ^ https://$host$request_uri? permanent;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ${HOST};
index index.php index.html index.htm;
root /var/www/html/mautic/docroot;
server_tokens off;
ssl_certificate /etc/letsencrypt/live/${HOST}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${HOST}/privkey.pem;
ssl_session_timeout 5m;
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
client_max_body_size 4M;
client_body_buffer_size 128k;
index index.php index.html index.htm index.nginx-debian.html;
location / {
# try to serve file directly, fallback to app.php
try_files $uri /index.php$is_args$args;
}
location ~ /(mtc.js|1.js|mtracking.gif|.*\.gif|mtc) {
# default_type "application/javascript";
try_files $uri /index.php$is_args$args;
}
location ~* ^/index.php {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
# Check that the PHP script exists before passing it
# try_files $fastcgi_script_name =404;
# try_files $fastcgi_path_info =404;
# try_files $fastcgi_path_info $fastcgi_script_name =404;
fastcgi_pass mautic:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}