Mautic Community Forums

NGINX config to prevent accessing php files in folders

Your software
My Mautic version is: 3.0.0
My PHP version is: 7.3.18

Your problem
My problem is: trying to change my nginx config so no public access to php files within the subfolders.

Right now you can access files such as https://myurl/bin/console and also https://myurl/app/AppCache.php etc. The console tries to download and the latter php files throws an error but exposes the full local path etc.

Tried a few variations but that breaks some internal stuff.

Any thoughys/help appreciated.

Thanks, Richard