homepage Welcome to WebmasterWorld Guest from 54.166.173.147
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Noob question: How to give access to filesystem outside documentroot?
daheri




msg:4235179
 9:05 am on Nov 26, 2010 (gmt 0)

Hi,

I have an apache web-server running.
I need to set up http access to the servers log-files in the easiest way possible.
Dont worry about security, this is just a local test-server for testing purposes.

documentroot is set to /usr/env/dev/www/docs

And I need to give http access to all files under
/usr/env/dev/logs

Any suggestions for a real newbie like me? ;)

Thanks for your help guys!

 

cmnetworx




msg:4235551
 6:59 am on Nov 27, 2010 (gmt 0)

Not sure if this would work or not, but you could try in your terminal

ln -s /usr/env/dev/logs /usr/env/dev/www/logs

or

ln -n /usr/env/dev/logs /usr/env/dev/www/logs


in theory (if this advice is anything worthwhile) it would create a link to the /user/env/dev/logs folder and files within it as /www/logs

if it worked correctly the logs folder should contain the logs without directly sharing the logs folder.

cmnetworx




msg:4235552
 7:00 am on Nov 27, 2010 (gmt 0)

you may want to verify with someone that knows more than I to make sure that will work before you try.

Pfui




msg:4235766
 11:45 pm on Nov 27, 2010 (gmt 0)

For http, I use a tiny Perl script to 'print' log tails (typically 500 lines; sometimes up to 5000 lines) thus making them instantly readable in a browser. If you run Perl, you'll find more details in one of my posts (# 4208975) here... [webmasterworld.com...]

cmnetworx




msg:4235961
 5:45 pm on Nov 28, 2010 (gmt 0)

I never thought of that, I suppose if your using php you could just do an include statement. Assuming it can grab a document from elswhere on the server. Could come down to a permissions issue..
<?php
include('/usr/env/dev/logs/logname');
?>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved