Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem running Rails/Passenger app on slice that also serves static html sites
    primarykey
    data
    text
    <p>I'm running a Rails app on an ubuntu hardy box with passenger. I also have a couple basic html sites running on the same box. My problem is that the apache vhost set up for the html sites seems to be blocking my Rails app from resolving at the proper url.</p> <p>I have a number of Rails apps running on different slices using passenger, so I know how to make this work generally.</p> <p>I'm not getting any errors in the terminal or in the apache logs. Everything appears to be working perfectly, but the site will simply not resolve at the proper url. Instead, when I go to the url where my Rails app should be, I see the site that is the apache default vhost on my slice.</p> <p>To confirm my assumption, I disabled all of the vhosts on my slice associated with the static html pages. After doing that, my Rails app appeared at the proper url and worked fine. When I re-enabled the vhosts for the html sites, I was back to the same problem again.</p> <p>My bet is that there's an easy configuration fix to this, but I can't figure it out. Anybody know?</p> <p>Thanks.</p> <h2>Update to answer question in the comment</h2> <p>Yes, the static sites work fine by themselves. Under all circumstances, the static sites are fine.</p> <p>My vhost files are using super basic setup. Static site vhost files look like this: </p> <pre><code>&lt;VirtualHost *:80&gt; ServerName foo.com ServerAlias www.foo.com DirectoryIndex index.html DocumentRoot /home/blah/public_html/foo/public &lt;/VirtualHost&gt; </code></pre> <p>Passenger vhost file looks like this: </p> <pre><code>&lt;VirtualHost *:80&gt; ServerName bar.com ServerAlias www.bar.com DocumentRoot /home/blah/public_html/bar/current/public &lt;/VirtualHost&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload