M
M
Maksim Markitantovm2017-07-23 18:37:30
Apache HTTP Server
Maksim Markitantovm, 2017-07-23 18:37:30

How to disable the ability to see the file tree of the public directory?

Framework Laravel. I upload photos to the server in the public/photos folder. But when I opened the picture from the link, I saw the address something like site.local/photos/1500822753V7gq3fLh.jpg. When you go to the photos folder, a file tree is displayed. Is this considered bad manners (perhaps a vulnerability) and how can I prevent the transition to this folder (prohibit seeing the file structure), while opening images?
e8ab42ad44a34801989ae69733578399.PNG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Pushkarev, 2017-07-23
@markitantovm

Add htaccess to main
Options -Indexes

X
xmoonlight, 2017-07-23
@xmoonlight

https://wiki.apache.org/httpd/DirectoryListings

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question