PDA

View Full Version : How do you deny access to a website folder or files?



user1397
September 3rd, 2007, 05:39 AM
How can you do it so that people get a "Access Denied" sort of message if they try to go to your website files dir?

I imagine this is used so that no one steals your code, and even though I'm all pro-open source, this would be part of a website-redesign project I'm working on for a company, and they want this feature.

user1397
September 3rd, 2007, 06:48 AM
bump

HermanAB
September 3rd, 2007, 06:50 AM
You configure it in /etc/httpd/conf/httpd.conf with deny and allow rules for each virtual host on your server. This gives you very fine grained control.

Go to the Samba web site and start reading. This is not a simple question, since there are various ways to do it.

Cheers,

H.

user1397
September 3rd, 2007, 07:59 AM
You configure it in /etc/httpd/conf/httpd.conf with deny and allow rules for each virtual host on your server. This gives you very fine grained control.

Go to the Samba web site and start reading. This is not a simple question, since there are various ways to do it.

Cheers,

H.ah i thought it would just be some code you could put in your website (i don't have access to the company's web server right now, and the site doesn't use php or anything, it's just n information site (xhtml and some javascript)

also just so so understand, i am not working on linux right now, I'm actually doing most of my web designing on windows

thanks for replying

popch
September 3rd, 2007, 08:54 AM
You configure it in /etc/httpd/conf/httpd.conf with deny and allow rules for each virtual host on your server. This gives you very fine grained control.

Go to the Samba web site and start reading. This is not a simple question, since there are various ways to do it.

Cheers,

H.

Actually, you should not read the documentation on Samba but on the web server being used.

Some web server (e.g. Apache) can be so configured that the access rights and other parameters can be set individually per directory.

st4rdr1ft3r
September 3rd, 2007, 10:25 AM
Or you could chmod 640 the files/dirs you want to protect

userundefine
September 3rd, 2007, 12:42 PM
htaccess

user1397
September 3rd, 2007, 06:15 PM
okay I guess I thought it was easier than editing web server config files, thanks for all the replies.

Sporkman
September 4th, 2007, 03:49 AM
You could also give the directory a cryptic name.