Ok, so I got my web host to install Ruby and RoR for me! The posted a "testapp" just so that I could see its up and working. So they created a directory named "testapp" which is in my "public_html" folder (so it can be seen by the world). Anyways, inside "testapp" is all the standard RoR folders (app, config, db, etc, etc). So basically to access their sample app the url is... www.<url_here>.com/testapp/app/say/hello How can I get the url to only be, www.<url_here>.com/say/hello or just /hello ? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
augustlilleaas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-18 12:20 UTC
Re: Deploying an application to the web
Actually, your url with your current setup would be url.com/public/controller/method. The rewriting is done through .htaccess and dispatching, not accessing the app folder directly. Also, with that setup, everyone could go url.com/config/datbase.yml and get your DB credentials. I expect that you are on a unix box. You want the testapp dir to be in the same dir as public_html. In other words, say public_html is in /home/your_user/public_html, the app should be in /home/your_user/testapp. Then you create a symlink. Remove the entire public_html folder. Then, in /home/your_user do this command: ln -s testapp/public public_html There you go, url.com will now be directly to your RoR app. On Jan 18, 1:11 pm, "cdvr" <codecr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok, so I got my web host to install Ruby and RoR for me! > > The posted a "testapp" just so that I could see its up and working. So > they created a directory named "testapp" which is in my "public_html" > folder (so it can be seen by the world). Anyways, inside "testapp" is > all the standard RoR folders (app, config, db, etc, etc). So basically > to access their sample app the url is... > > www.<url_here>.com/testapp/app/say/hello > > How can I get the url to only be, www.<url_here>.com/say/hello or just > /hello ? > > Thanks.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
shouldn''t this be done via a load balancer? augustlilleaas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Actually, your url with your current setup would be > url.com/public/controller/method. The rewriting is done through > .htaccess and dispatching, not accessing the app folder directly. Also, > with that setup, everyone could go url.com/config/datbase.yml and get > your DB credentials. > > I expect that you are on a unix box. > > ln -s testapp/public public_html > > There you go, url.com will now be directly to your RoR app.-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ok what I normally do is put my php scripts, html pages etc into user/public_html/ i guess i am trying to figure out where to put my rails app which has directories like.. my_app/ app config db . . . do I put my_app into public_html? then that causes the problem things like the "DB" folder being exposed. thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
cdvr wrote:> do I put my_app into public_html? then that causes the problem things > like the "DB" folder being exposed.Look "Capistrano" up. It automates a system for uploading things to a server. No more SCP-ing individual files in by hand, setting their permissions, etc. To bypass Capistrano (_temporarily_, before you activate it), try this: - Put your Rails app in a folder next to public_html - reconcile public_html/.htaccess and app/public/.htaccess - reconcile the matching public/dispatch* files - recycle public_html - make a symlink (ln -s) from app/public to public_html Now the warning label. ONLY do that as an experiment, along the way towards installing Capistrano. Once you do, erase the public_html symlink, and symlink from releases/current/public to public_html. -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---