Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

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

$
0
0
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.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>