473,785 Members | 3,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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">scrip t.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 3498
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">scrip t.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\wwwr oot, 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\wwwr oot. Some images for
default.htm might be in C:\Inetpub\wwwr oot\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\wwwr oot, 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\wwwr oot. Some images for
default.htm might be in C:\Inetpub\wwwr oot\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
1278
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 doesnt exist ???? How do I fix this???? -- Eric Haskins RackSPEED.Net WebHosting from $4.99/month
2
2720
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 drive mapping the server is on. since this database will be used by multiple people, it then means that each user must have the same drive mapped to the same drive letter. The linked table manager doesn't recognize UNC encoding. The problem...
1
4010
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 live databases on the network. Is there a way, via code, when I get back in-house from being on the road to click a button, and select the backends I want to link to? I would want to delete all the current links and link to the "live"
6
5303
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 report any error while writing to the open file handle. On Windows, file shows-up again in explorer and automatically deleted finally when program ends. On Unix, same thing happens if file is on nfs mounted drive, but in this case, actual file is...
3
3809
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 trigger off of the mounting process so I can search for a specific file on that hard drive (which is always guaranteed to be in a specific spot).
4
1863
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 to lock-down and encrypt a hard drive. I remember back in my high school days experimenting with a low-level driver called KOH.COM that would require a password upon startup to decrypt file system files. It would be wonderful if a similar...
4
2433
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 about a missing ".so" file, with Perl flagging the "use DBD::DB2" line. (I don't have the exact message since I'm heard about it from a remote sysadmin who only saw it scroll by on the console). However, if I login as root on that machine and run...
1
2192
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 network but then the link from the front end (in the C drive of the laptop) to the back end (network drive) is lost. I have to then go to the tables section of the database window of the Front End and remove the links then link them again with the Back...
5
7954
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
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9947
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.