Hello to all! First I want to appologize if this topic has been already discussed but the search does not work :) I have RoR installed on a shared server. I also have a RoR application installed in a subdomain. The structure is as follows: www //this is my home WWW folder +--- www //maps to www.mydomain.com | +--- webapp //maps to webapp.mydomain.com. Here is my RoR application | +--- app | +--- components | +--- config | +--- db | +--- lib | +--- log | +--- public | +--- script | +--- themes | +--- vendor | +--- anothersubdomain // maps to anothersubdomain.mydomain.com As shown above my RoR application is installed in the webapp folder. I do not have other RoR applications installed. Is there a way to get rid of the "/public" in my url''s? I read all the tutorials at http://wiki.rubyonrails.com/rails/pages/Howtos but I just can not manage to make it. I am going to hang myself on the next tree... I just need a concrete example. Can someone help me? Thank you in advance! Regards -- Posted via http://www.ruby-forum.com/.
Hm, that setup seems to open big security breach: is http://webapp.mydomain.com/config/database.yml visible? Advise: don''t place your code under website document root. It should be possible to place there only contents of your "public" dir, and the rest of your app - somewhere outside webroot, e.g. /home/you/rails-app, with symlink /home/you/rails-app/public -> www/webapp.mydomain.com/ On 3/7/06, Lunohod Lunohodov <lunohodov@gmail.com> wrote:> Hello to all! > > First I want to appologize if this topic has been already discussed but > the search does not work :) > > I have RoR installed on a shared server. I also have a RoR application > installed in a subdomain. The structure is as follows: > > www //this is my home WWW folder > +--- www //maps to www.mydomain.com > | > +--- webapp //maps to webapp.mydomain.com. Here is my RoR application > | +--- app > | +--- components > | +--- config > | +--- db > | +--- lib > | +--- log > | +--- public > | +--- script > | +--- themes > | +--- vendor > | > +--- anothersubdomain // maps to anothersubdomain.mydomain.com > > > As shown above my RoR application is installed in the webapp folder. I > do not have other RoR applications installed. > > Is there a way to get rid of the "/public" in my url''s? I read all the > tutorials at http://wiki.rubyonrails.com/rails/pages/Howtos but I just > can not manage to make it. I am going to hang myself on the next tree... > I just need a concrete example. Can someone help me? > > Thank you in advance! > > Regards > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Lugovoi Nikolai wrote:> Hm, that setup seems to open big security breach: > is http://webapp.mydomain.com/config/database.yml visible? > > Advise: don''t place your code under website document root. > > It should be possible to place there only contents of your "public" > dir, and the rest of your app - somewhere outside webroot, e.g. > /home/you/rails-app, with symlink /home/you/rails-app/public -> > www/webapp.mydomain.com/Thank you for the advise! I have used .htaccess files to secure the sensible data. Unfortunatelly it is not possible to use symlinks... Is there another way ot solving my problem? Regards -- Posted via http://www.ruby-forum.com/.
Can you configre your DNS so that webapp.mydomain points to /home/you/rails-app/public ? On 3/7/06, Lunohod Lunohodov <lunohodov@gmail.com> wrote:> > Lugovoi Nikolai wrote: > > Hm, that setup seems to open big security breach: > > is http://webapp.mydomain.com/config/database.yml visible? > > > > Advise: don''t place your code under website document root. > > > > It should be possible to place there only contents of your "public" > > dir, and the rest of your app - somewhere outside webroot, e.g. > > /home/you/rails-app, with symlink /home/you/rails-app/public -> > > www/webapp.mydomain.com/ > > Thank you for the advise! I have used .htaccess files to secure the > sensible data. Unfortunatelly it is not possible to use symlinks... Is > there another way ot solving my problem? > > > Regards > > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060307/e604e0ce/attachment.html
Lunohod Lunohodov wrote:> Thank you for the advise! I have used .htaccess files to secure the > sensible data. Unfortunatelly it is not possible to use symlinks... Is > there another way ot solving my problem?Try mapping directly to your "public" directory, i.e: webapp.mydomoin.com -> /your/rails/app/public -- Marcus