Welcome! Log In Create A New Profile

Advanced

How can I protect some folders from my MVC structure with Nginx?

Posted by roguitar88 
How can I protect some folders from my MVC structure with Nginx?
October 18, 2021 09:32PM
Folks, I have a website developed with MVC, and I have the following folders: app, public, src and config. Except public, of course, I don't at all want the folders 'app', 'src' and 'config' including their contents and subfolders to be accessed. Recently, I've done something like that, for instance:

location ^~ /app {
deny all;
}

Now I wonder if that by itself is enough to protect such folders, once they store stuff like controllers, views, models, includes, configuration scripts, and all my business rules and whatnot. If not, what would you recommend. Note: that project server language is PHP.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 47
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready