• Welcome to the Off-Topic/Schweb's Lounge

    In addition to the Mac-Forums Community Guidelines, there are a few things you should pay attention to while in The Lounge.

    Lounge Rules
    • If your post belongs in a different forum, please post it there.
    • While this area is for off-topic conversations, that doesn't mean that every conversation will be permitted. The moderators will, at their sole discretion, close or delete any threads which do not serve a beneficial purpose to the community.

    Understand that while The Lounge is here as a place to relax and discuss random topics, that doesn't mean we will allow any topic. Topics which are inflammatory, hurtful, or otherwise clash with our Mac-Forums Community Guidelines will be removed.

DocumentRoot in my Documents folder to make source-code private

S

screenmates

Guest
Hello,

Trying to figure out a way to point the httpd document-root to my Documents folder to make the files completely private. I was able to modify the httpd.conf but I guess I was unable to set the www user access the localhost because my Documents folder is private! However, I was able to accomplish this on XP without a problem. The purpose of doing this is to hide my source-code from prying eyes. How do I set the www user able to execute files on localhost on my Documents folder but not allow reading the source files? The default localhost is installed on:

/Library/WebServer/Documents

that allows other users access my source-code and I wish to point it to:

/Users/<user>/Documents


User-type: Administrator

Please help...
TIA
 
Joined
Jun 6, 2006
Messages
1,153
Reaction score
94
Points
48
Your Mac's Specs
MacBook 2.0GHz White, 512MB RAM, 60GB HDD
If you just keep your source code in the Sites folder in your home directory and access it like so:

http://localhost/~username

Then you can avoid all the pain of having to mess with your document root.
 
OP
S

screenmates

Guest
cazabam said:
If you just keep your source code in the Sites folder in your home directory and access it like so:

http://localhost/~username

Then you can avoid all the pain of having to mess with your document root.


As an admin, my localhost is defaulted to the /Library/WebServer/Documents folder when I installed the webserver - I did not modify anything.

Do you mean to say if I put my files in the user/Sites (or Sites/user - I don't remember as I'm not on my Mac right now) folder, others who login into my machine as other users/admins cannot access my source code using the Finder? The only place I could find so far that is not accessible to each other is the personal Documents folder and so thought that would be a better place to point the document-root to for local/private development.

Thanks,
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top