Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.