I have a website and right now users can just open a directory and see all files in it. How do I disable that?
I was thinking about the php.ini file, or generally any php configuration that might do the trick (it is an Apache server run with PHP).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Disable
Indexesoption in apache configuration.Put this either in your
httpd.confor.htaccessin the root of the site.This way, if the folder does not have an index page, the user will get a 403 Forbidden error.