Problem accessing folder within the domain

Hello I just installed hestiacp on the vps with debian 12. I added the domain and when I access it as my domain.com, I can normally access the index.html file which is inside the public_html folder. However, I need to access a php script that is inside a folder, meudominio.com/minhapasta. Then it doesn’t access and I get error 500 This page is not working p2apps.com.br is unable to fulfill this request at this time. HTTP ERROR 500 Can anyone help me resolve this

Check the logs
Check the nginx template or apache2 config