473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Linking to file on NFS mounted drive

Hello,

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:
http://www.hostname.com/home/nfs_dri...t/dir/script.C

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.

Jul 26 '07 #1
3 3464
sh****@vt.edu wrote:
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:
http://www.hostname.com/home/nfs_dri...t/dir/script.C
As it should.
>
I also tried using href="file:///..." and still had no luck.
Some browser versions limit this kind of access deliberately.
I know it must be something stupid that I'm missing, but if someone
could shine some light on it, that would be great.
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 www.example.com, 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 http://www.example.com/, and sees the
home page, possibly shown as http://www.example.com/default.com. The
images for the page can be seen (using the browser's View Source) to
come from http://www.example.com/images/.

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.

HTH.

--
John
Jul 26 '07 #2
What are you using, IIS? Let's take that example:
Apache -- installed on RHEL.
>
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 forwww.example.com, 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 tohttp://www.example.com/, and sees the
home page, possibly shown ashttp://www.example.com/default.com. The
images for the page can be seen (using the browser's View Source) to
come fromhttp://www.example.com/images/.

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.

HTH.

--
John
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.

Jul 27 '07 #3
sh****@vt.edu wrote:
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.
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,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eric Haskins | last post by:
I had a server lose a drive. This customer didnt back his database. I mounted old failing drive as a slave and can see .frm .MYI & .MYD But if I copy them to /var/lib/mysql/db_name it says .frm...
2
by: jayjay | last post by:
In the database I have, its split into front end screens and reports and backend tables for data. Of course, this means the linked tables are linked using the linked table wizard to the network...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
6
by: Kiran | last post by:
Hi, I have program, which opens file at the startup and logs error messages to the file, file handle is closed at the end of the program. However if file is deleted in-between, program do not...
3
by: Sped | last post by:
Hi, I'm looking for some code to monitor for when an external drive is connected to a computer (USB ThumbDrive, External Hard Drive, etc.) and is assigned a drive letter. I'd want my code to...
4
by: Alan Samet | last post by:
Is there a way to easily and securely use the Windows Encrypted File System (EFS) with IIS and ASP.NET? Alternatively, I would prefer to find some sort of totally encrypted low-level device driver...
4
by: Larry | last post by:
I have a Perl script using DBD::DB2, that runs during system startup on a Solaris system. The script is working fine during startup on many machines, except on one machine it fails complaining...
1
by: deiopajw | last post by:
I have a Back end database on a network drive. The copies of the front end are located on individual pc's (in their C drive). The problem arises when a laptop user naturally hooks up to the...
5
by: Yuri Shtil | last post by:
I want the users be able to browse and select files on the server side. Is there any good free or not very expensive commercial javascript package I could use? -- Yuri.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.