Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just for clarity, I already posted this on StackOverflow and got advice that this better fits in so here goes:

I know you can redirect subdomains to a different server, but can you do the same with folders?

Say I have I can redirect to a different server, but can I redirect to a different server? I'd like to host a rails app in that folder on a site that runs php while still maintaining good search engines ratings (by not creating a sub domain which in my experience in recognized as a different site).

Any help?


share|improve this question
up vote 1 down vote accepted

Take a look at Passenger: it's a module for Apache that allows you to run RoR apps within Apache. A bit further down in the Apache sub-section of [this][1] Ubuntu/RoR docs, it mentions creating a simlink to your RoR directory from your sub-directory in Apache, etc.

[1]: the server

Edit: actually, straight from the horse's mouth:

share|improve this answer
thank you very much! – yuval Mar 10 '10 at 4:30

Couldn't you keep those files on something like an NFS share and just export that share to be mounted the server that you want to read it?

share|improve this answer
i'd like to host an application using rubyonrails in while is using php as it's main langugae – yuval Mar 9 '10 at 0:47

Effectively what you want to do is have the subdirectory address act as a proxy.

This is most commonly seen if you're setting up an anonymizer or redirector script, so looking for existing scripts designed for that use may give you a good open source basis to start from. You may run into some issues with doing this (SSL security issues with man-in-the-middle, etc.) but working from the existing setups will probably get you most of the way to where you want to go.

You may also be able to use this same setup (or look at existing scripts providing) authenticated access to internal servers - connecting to encrypts everything to your gateway proxy server which then passes traffic off inside your hopefully-secure internal network.

share|improve this answer

Should be no problem, you can either make an NFS share out of your folder or place a redirect/frame script in it, although that last option would off course not be a very search engine friendly one. Creating an NFS/SMB share (depending on which OS'es are used) should do the trick just fine.

share|improve this answer

Your Answer


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.