Linking to file on NFS mounted drive

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I am trying to create a code repository for myself and am having
trouble linking to files.  Basically, the web server computer has
drives from several other computers nfs mounted to it -- and I want to
link to a file (just a .C file) on one of the nfs mounted drives.  I'm
an html novice and have tried:

<p><a href="/home/nfs_drive_mount_point/dir/script.C">script.C</a></p>

But the link comes up as:

I also tried using href="file:///..." and still had no luck.

I know it must be something stupid that I'm missing, but if someone
could shine some light on it, that would be great.

Re: Linking to file on NFS mounted drive wrote:

Quoted text here. Click to load it

As it should.

Quoted text here. Click to load it

Some browser versions limit this kind of access deliberately.

Quoted text here. Click to load it

The problem is that a Web server sees files differently from the way the
OS sees them, (even when they are the exact same files).

What are you using, IIS? Let's take that example:

When you install Microsoft's IIS, it creates a file structure within the
OS (some flavor of Windows) for its own purposes. By default, it creates
(i.e., it asks the OS to create) C:\Inetpub\wwwroot, with some other
subdirectories in wwwroot. Meanwhile, within the site (IIS
administration) the admin can create a structure for resources to be
served. Subfolders in the site are created in the OS with the same name
(by default, anyway; I believe they can be different).

So for, the server machine has some files, like
default.htm and contactus.asp, which are located on its C: drive
(remember, this is configurable) in C:\Inetpub\wwwroot. Some images for
default.htm might be in C:\Inetpub\wwwroot\images\.

The Internet visitor browses to /, and sees the
home page, possibly shown as . The
images for the page can be seen (using the browser's View Source) to
come from /.

The Web service (here, IIS) can be configured to map real (OS)
directories to virtual (Web) directories. How one does this depends on
the service (IIS, Apache, etc.) and version thereof. See your admin ;-)

You'll need to tell your Web server to serve these resources somehow,
and adjust your links accordingly. It may not work out as neatly as you
wish. Also, it's been a while since I've done this sort of thing, so add
salt to taste. GL.



Re: Linking to file on NFS mounted drive

Quoted text here. Click to load it

Apache -- installed on RHEL.
Quoted text here. Click to load it

I see what you are saying -- I suppose that the simplest solution
probably is just to create symlinks to the nfs mounted files in the
public_html directory, or hell, just symlink the nfs mount points
directly -- why the hell didn't I think of that before I wasted your
time with that question.  Sorry about that, but thanks for the help.

Re: Linking to file on NFS mounted drive wrote:

Quoted text here. Click to load it

Sometimes one can be too close to a problem to see the simple answers.
And sometimes just asking get you to look at the problem a different
way. No time wasted if it solves your problem!

Take care,


Site Timeline