[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux Path



On Mon, Jun 11, 2012 at 11:53:38AM -0400, Tony Baldwin wrote:
> On Mon, Jun 11, 2012 at 05:23:56PM +0300, Jari Fredriksson wrote:
> > On Mon, June 11, 2012 17:15, Ethan Rosenberg wrote:
> > > Dear List -
> > >
> > > I have a deficiency in my knowledge of paths.
> > >
> > > Will you please help.
> > >
> > > My working directory is /var/www/Webpages2
> > >
> > > In that directory I have a file b.mp4.
> > >
> > > This file also is in /home/ethan/Gingy/Pictures/Vol_1
> > >
> > > If I access b.mp4 in /var/www/Webpages2,  [src="b.mp4"] the file is found.
> > >
> > > It is not found using the full path [src="
> > > /home/ethan/Gingy/Pictures/Vol_1/b.mp4"] .
> > >
> > > Where is my error?
> > >
> > > Thanks.
> > >
> > > Ethan Rosenberg
> > >
> > 
> > How do you access it? If with a web browser (as the folder /var/www
> > suggests), it is not possible to access anything out of /var/www.
> > 
> > You can move the file to /home/ethan/public_html/Gingy/Pictures/Vol_1 and
> > access it via http://server/~ethan/Gingy/Pictures/Vol_1/b.mp4
> 
> Assuming apache (a logical assumption here), indeed, only items in the
> webroot (/var/www/* in your case) will be served.
> However, you needn't necessarily move the file there.
> You could also symlink it.
> On one of my servers, I have a lot of stuff in a subdir of the /home for an extra user I created that is symlinked in /var/www, like
> ln -s /var/www/somedir /home/dude/somedir
> This I do because the / root partition has only 20gb, while my /home
> partition has nearly the remainder of a 500gb hdd.
> 
> Just an option to consider.
> 
> Either way, you've got to either move the file to webroot (/var/www/)
> or symlink it.

I just realized how odd a configuration that must seem for a server.
To explain, the machine in question was a my regular desktop for a few good years, 
a celeron 3.2ghz single core with only 1.5gb ram, however, and was
replaced for my work purposes this winter, so now is serving as a
server.  I didn't reinstall the OS or anything, just kept the machine as is,
but deleted a lot of unneeded stuff and, of course, added apache and
anything else a server needs.
It hosts a dokuwiki for my personal use, test space/playground for my friendica
and other web development activities.
The dokuwiki is in the /home partition and symlinked, as noted,
as are some other materials.

./tony
-- 
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E

Attachment: signature.asc
Description: Digital signature


Reply to: