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

I have a working rails application that I want to be served through another domain name. So I modified the VirtualHost by adding it as a ServerAlias:

<VirtualHost *:80>
        DocumentRoot /home/my/app/public
        RewriteEngine On

        ProxyRequests Off
        ProxyPass / http://localhost:3000/
        ProxyPassReverse / http://localhost:3000/
        ProxyPreserveHost on   

         <Proxy *>
          Order deny,allow
          Allow from all

But, for some odd reason, when I go to it gives me the Fedora test page.

I'm able to find documents under /public if i go to them directly (eg. But the requests are not being handled by Rails. Going to the root path should redirect to the login (by rails).

Any ideas? How can I debug what's going on?

(A possible unrelated caveat: '' is a URL that's being leased from someone else as they are the owner.)

share|improve this question
Did you restart apache after adding ServerAlias? Seems like your requests are still getting caught by a default vhost. – Shane Madden Aug 11 '11 at 19:03
up vote 1 down vote accepted

On the basis that you're almost certainly working on the same problem as last time, and don't appear to have worked on most of the issues involved there, I'll reiterate my previous advice:

It does look like they're proxying. You can verify this by hitting the site and looking at the source IP -- if it's yours, then they're not proxying, they're doing something really weird, otherwise the source IP should be that of their proxy box. I would imagine that their proxying is probably doing all sorts of unpleasant things to the setup -- if the Host header being sent by their proxy server isn't what you're expecting, for instance, then that'll naturally cause problems. I always log the provided vhost name in my "default vhost" logs for this very reason -- it shows me what people might be hitting me from.

When it comes to the setup, I'd strongly recommend getting them to change the DNS to point to your server directly. That you're "leasing" the domain is irrelevant; DNS can still be managed properly. The only time proxying makes sense is if they're only redirecting part of the site to you, and serving other content on the same domain locally.

share|improve this answer
I created a different question because there is new evidence (and I will likely delete the other one). I checked the IP on the request and it IS my IP. Given that I can actually reach the file at the DocRoot, I'm less inclined to think it's a (dns) proxy issue as opposed to an apache proxy issue. I can't obtain the domain name form them (I guess leasing is common so this should work). – freshfunk Aug 11 '11 at 19:08
Also, the reason why I created a different question was that I left out the issue of them proxying since I took your advice and verified that my IP was showing up in the access logs. shrug – freshfunk Aug 11 '11 at 19:11
It ended up being an issue due to the proxying. Blergh. Anyway, this ends up being a dupe of this (I described the issue in detail here)… – freshfunk Aug 11 '11 at 21:27

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.