L
L
littleguga2016-03-23 18:03:50
PHP
littleguga, 2016-03-23 18:03:50

How to hide the vendor folder (in a specific case) and should I do it?

There is a site directory (example.com)

/var/www/example:
     vendor/
     public/
     blabla/

In the nginx configs, /public/ is set as root, but now you need to open your application with its own /vendor/ at /public/folder/(example.com/folder/).
It is clear that the first thing that comes to mind is -> change the nginx config and make an alias/rewrite to /var/www/folder/, but the problem is that such a /folder/ should be on a large number of sites and climb into the config as - something not very.
Additional information:
In the /folder/ folder there is an index.php file, which takes everything from its /vendor/
Question: is it worth hiding /folder/vendor/ in this case or is it okay that it will be available from the web?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-03-24
@littleguga

you can just disable access to this directory through the browser and give a 403 error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question