Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to create a symbolic link to a network volume? I have a lot of content stored on a machine that I would like to serve up with apache from another. Basically I want http://mysite.com/ to read HTML files from the machine with apache installed, and http://mysite.com/content/ to pull content from my other machine.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You'll want to use mod_proxy in ProxyPass mode. The short version is:

ProxyPass /content http://some-other-site/content
ProxyPassReverse /content http://some-other-site/content

That's assuming that your other machine is running HTTPd. If not, you'll need something like NFS or Samba to make the contents available to your server that runs mysite.com.

share|improve this answer
    
you sir, are a genius –  KevMo Oct 27 '09 at 21:55
    
I do what I can :) –  Bill Weiss Oct 27 '09 at 22:39

Not sure what you mean by 'symlink to network volume'. The symbolic link really needs to go to a mounted volume. And if the volume is mounted, you don't really need the symlink, you can use the Alias directive.

(all paths made up)

Say you have your (other machine) content mounted at /mnt/content. Yes, you can symlink /var/www/html/content to /mnt/content, but you can also do Alias /content/ /var/www/content/ in your httpd.conf.

So the answer is yes, you can do this, but there are probably other ways to do this too.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.