Jump to content

Need advice on securing directories


OM2

Recommended Posts

I need advice on securing directories

 

I have a Linux server

 

If the directory is empty or doesn't contain an index file, then the contents are displayed

 

How do I stop people from looking at the contents if the directory doesn't have an index?

I'm a complete newbie in relation to this!

 

Is there a security setting that I can make in Cpanel for example?

What if I only wanted to protect a sub set of directories - and leave all other directories outside with the existing settings?

 

Thanks

 

 

OM

Link to comment
https://forums.phpfreaks.com/topic/146927-need-advice-on-securing-directories/
Share on other sites

You can .htaccess it or if your own server you should modify the apache http.conf file.

 

you said "or if your own server"

i do own my own server

is using the http.conf a better way?

 

i need to get others to develop on my server

if they run the command to give all environment variables, will there be a danger of them getting access to the user/pass using the http.conf way?

(apologies: i ask without looking up what http.conf involves! looking this up now. would be great to get an answer regardless though!)

 

i've just read about .htaccess - it seems pretty good and what i need

but if http.conf is the better way, maybe i should use that?

 

thanks

It is not necessarily the better way. But you should have that option set in there by default.

 

You can add the Options +Indexes parameter in the http.conf file under the <directory></directory> declaration to prevent this, then users can allow a certain directory to display contents by using .htaccess if they so choose.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.