Your software
My Mautic version is: 4.4.9
My PHP versions is: 8.0.30
My Database type and version is: 10.6.12-MariaDB
Your problem
My problem is: I would like to block the access to the login page and only allow our VPN IP. I tried by adding the following to my nginx configuration but I blocked much more than just the login page.
location / {
# try to serve file directly, fallback to app.php
allow vpnIP;
allow 127.0.0.1;
deny all;
try_files $uri /index.php$is_args$args;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
}