Apache-Private Dirs?

Posted:
in Genius Bar edited January 2014
Is it possible for me to server a private "locked" folder(directory) on my Apache server that only 1 user can get to from the web? I need it secure and pasworded. I'm not sure if I need to edit the folders UNIX permissions, or do it from the Apache httpd.conf config file-or both.



I created a test folder on my Apacher server in /library/webserver/documents/testfolder. I then created a test user named "test" with password "password", who is the owner of the folder, and the only user with permissions to read/write to the "test" directory. Next I tried to log 0n to the Apacher server like this:

<a href="http://test"; target="_blank">http://test</a>; assword@address/testfolder/index.html, but it doesn't work :-(



Do I need special software or modules to do this? WebDAV? PHP? JSP?

Comments

  • Reply 1 of 1
    jregojrego Posts: 56member
    I think there is something in the Apache configs that password protects directories. That would probably be a good place to look. There are many howtos online, just check Google.



    It is possible to password protect pages with PHP, I've done that before many times, but you can't protect downloads like that unless you put them in a database or something. Depending on what you're trying to do, PHP might work, but it's probably not what you're looking for. JSPs are, in my experience, pretty close to PHP, except Java, and they have similar limitations.



    One thing to look in to is FTP. There are some cases where it won't work, but it has all the password protection and custom directories built in. If you just want a remote directory for yourself, FTP would be a great solution.
Sign In or Register to comment.