Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you use suburi-s, then </p> <ol> <li><code>&lt;documentroot&gt;/&lt;suburi&gt;</code> is meant to point to the public dir of your rails app</li> <li>your rails app root dir is meant to be one directory above your rails app public</li> </ol> <p>Both are solved if you got a dedicated public docroot for your domain, and then you do </p> <pre><code>ln -sf /path/to/suburi-rails-app/public &lt;documentroot&gt;/&lt;suburi&gt; </code></pre> <p>The documentation is indeed not so great. So your solution would be:</p> <pre><code>ln -sf /srv/www/suburi/public srv/www/mydomain/public/suburi </code></pre> <p>and the vhost conf:</p> <pre><code>&lt;VirtualHost 173.230.137.212:80&gt; ServerName www.mydomain.com ServerAlias mydomain.com DocumentRoot /srv/www/mydomain/public ErrorLog /srv/www/error.log RewriteEngine On RewriteOptions Inherit RailsEnv production &lt;Directory /srv/www/mydomain/public&gt; Options FollowSymLinks -MultiViews AllowOverride all Order allow,deny Allow from all &lt;/Directory&gt; RailsBaseURI /suburi &lt;Directory /srv/www/mydomain/public/suburi&gt; Options -MultiViews &lt;/Directory&gt; &lt;/VirtualHost&gt; </code></pre> <p>you say that: Both the rails app for mydomain.com and the rails app for mydomain.com/suburi reside in /srv/www/</p> <p>This confused me a bit, I don't think it is a good idea to want to run an app on a domain and another on a suburi, since routing is bound to be confused. Rather use 2 suburi-s, in which case do </p> <pre><code>ln -sf /srv/www/suburi2/public srv/www/mydomain/public/suburi2 </code></pre> <p>where /srv/www/suburi2 is your second applications root dir, and add:</p> <pre><code>RailsBaseURI /suburi2 &lt;Directory /srv/www/mydomain/public/suburi2&gt; Options -MultiViews &lt;/Directory&gt; </code></pre> <p>you can add any number of suburis to the same vhost.</p> <p>hope this helped</p>
 

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