I do not think this issue with mautic, but with nginx configuration. Can you share your nginx config (you can do it via PM to not expose any sensitive data).
but it was working fine before I used this command sudo rm -rf var/cache/* . Plus I have another instance running on another virtual machine using the same configuration.
What if you try to replace entire var folder from repo here (everything under var - of course you first backup existing folder on the server):
Since you said it worked before. I would also backup entire source directory (mautic) and try to clone appropriate version from GH (you will have to copy app/config/local.php from previous folder to make app aware of already installed database etc.).
I downloaded var from github, replaced the current var directory with the download, changed permissons, owner and group. still not working.
for the 2nd suggestion, I understand this to be a new install, right? It is like replacement of the entire directory, just keep the local.php. I’ll do it tomorrow, but I’m pretty sure it will work (I could install mautic from scratch some times).
My lesson for now is to never clear the cache that way again