Welcome Guest | Login

"Rails application failed to start properly" for non-rails page

I'm trying to make a non-rails subdomain on my rails app. I want mydomain.com to generally go to my rails app (set up as a symlink from public_html to myapp/public), but have a subdomain nsf.mydomain.com to go to a non-rails subdirectory
I set up the subdomain in cpanel and made a symlink with:
ln -s ~/nsf ~/public_html/nsf

Currently, if you go to nsf.mydomain.com/index.html everything works fine, but simply nsf.mydomain.com gives me an "Application error -- Rails application failed to start properly".

I'm assuming this is because my public_html is symlinked to inside my rails app, but I'm not sure how to fix it. Is this a server issue or a routes.rb issue?

thanks!

Peter

2008-04-28 07:17 PM

Hi Peter,

Now the URL http://nsf.mydomain.com itself is displaying the index page. You have to include the following line in the .htacess of the main domain and sub domain.
 
  RewriteCond %{REQUEST_URI} ^/nsf.*
  RewriteRule .* - [L]

2008-04-28 08:55 PM

That works, but seems to have introduced another problem. In my rails app I want to use public/index.html as my landing page for http://www.charting1968.net or http://charting1968.net . Now going to either of those addresses gives me:

"The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved."

Any ideas?

thanks,
Peter

2008-04-28 09:49 PM

The site is now loading the default page. I've corrected a wrong rewrite rule entry under your .htaccess file.

RewriteRule ^/$ index.html [QSA] to--> RewriteRule ^$ index.html [QSA]

2008-04-28 10:55 PM

beautiful, thank you very much Vinayan and Varun!

2008-04-28 11:15 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.