Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux Apache web server serving up files which comes from a NT machine

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
Hello there,

Can somebody tell me if this is possible : ?

I have a Linux machine and a Windows NT4 machine, all my web files are sitting on the NT machine, now what i need to do is use Apache(Linux) to serve up my web files. I'm trying to avoid keeping a duplicate set of files on my Linux machine

This is very similar to virtual directory in IIS. You can establish a virtual directory but specify a directory path of another "mapped" computer.

Can this be done bet Linux - NT machines?
 
Hi,

With linux you have a virtual file system such that the physical location of directories in the tree is entirely transparent. Different directories may be on different partitions on the same box or mounted via NFS, samba or whatever. So, as long as you can mount the NT directory into the linux tree then you just point Apache at the mount point. You can use the samba smbmount command something like this

smbmount //NT_SERVER/MYDOCS /mnt/mydocs -n -I 172.16.0.3

This would mount the share //NT_SERVER/MYDOCS as /mnt/mydocs in linux (assumes guest access). See the samba doumentation --> .

Rgds
 
Using samba, NFS or whatever is a simple way to solve the problem. However, from a performance & security perspective it might not be an optimal solution.

If all editing is done on the NT-side, why not just copy all files (via ftp, scp or whatever) to the linux-box. If the linux-box is targeted by hackers, the original site is probably still untouched on the NT-machine.

But as a Q&D solution - I'd go with the first suggestion...
 
Thanks for all your suggestion:

i tried the ff but it keeps giving this error:

session setup failed:ERRDOS - ERRnoaccess (Access denied)

Here's the commands that i tried:
smbmount //NTservername/winshare /mnt/linuxshare
smbmount '//NTservername/winshare' '/mnt/linuxshare'
smbmount '//NTservername/winshare' '/mnt/linuxshare' -U
myusername
smbmount '//NTservername/winshare' '/mnt/linuxshare'
username=myusername

i can't get the syntax right. I know that its working bec i can use smbclient to connect to the server, but it doesn't let me mount.

Thanks for any suggestion
 
Hi,

There are actually various alternative forms of the smbmount syntax.

The original is like this :

smbmount //ntserver/winshare -c 'mount /mnt/linuxshare'

with the smbfs utilities available that can be simplified to :

smbmount //ntserver/winshare /mnt/linuxshare -o username=guest,password=,workgroup=ntdomain

The alternative to the above (and preferred syntax) is like this :

mount -t smbfs -o username=guest,password=,workgroup=ntdomain,uid=48,gid=48 "\\\\NTSERVER\\My Documents" /mnt/linuxshare

Please note the uid and gid fields. This is so that you can map the mounted filesystem in permission terms to a linux user. You would probably want to mount as the 'apache' user. Do a 'cat /etc/password' - the third and fourth fields are the uid and gid respectively.

Hope this works now...

Rgds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top