da pendragon
2005-Nov-23 15:50 UTC
[Instantrails-users] Redirect remains from cookbook app
Hi, I''m just getting started with Ruby on Rails, and InstantRails was the perfect solution for me to get up and running with Ruby on Rails fast. However, I''ve run into a small problem: I''ve created a new app, but whenever I access it using an invalid URL or just the mysite.com/ (using a virtual server) directory, apache tries to redirect me to the cookbook tutorial app. I''ve removed the virtual server settings in httpd.conf, and set the proper path in .htaccess, but I still get redirected. What am I missing? Regards dapendragon. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051123/f4a8bb9a/attachment.htm
On 11/23/05, da pendragon <dapendragon at gmail.com> wrote:> > Hi, I''m just getting started with Ruby on Rails, and InstantRails was the > perfect solution for me to get up and running with Ruby on Rails fast. > However, I''ve run into a small problem: I''ve created a new app, but whenever > I access it using an invalid URL or just the mysite.com/ (using a virtual > server) directory, apache tries to redirect me to the cookbook tutorial app. > I''ve removed the virtual server settings in httpd.conf, and set the proper > path in .htaccess, but I still get redirected. What am I missing?Did you set the DocumentRoot & Directory directives in you new app''s VirtualHost section? If you posted your VirtualHost section, it''ll be easier for us to help. Curt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051123/b67ca777/attachment.htm
da pendragon
2005-Nov-23 17:54 UTC
[Instantrails-users] Redirect remains from cookbook app
On 11/23/05, Curt Hibbs <curt.hibbs at gmail.com> wrote:> > On 11/23/05, da pendragon <dapendragon at gmail.com> wrote: > > > > Hi, I''m just getting started with Ruby on Rails, and InstantRails was > > the perfect solution for me to get up and running with Ruby on Rails fast. > > However, I''ve run into a small problem: I''ve created a new app, but whenever > > I access it using an invalid URL or just the mysite.com/ (using a > > virtual server) directory, apache tries to redirect me to the cookbook > > tutorial app. I''ve removed the virtual server settings in httpd.conf, > > and set the proper path in .htaccess, but I still get redirected. What am I > > missing? > > > Did you set the DocumentRoot & Directory directives in you new app''s > VirtualHost section? > > If you posted your VirtualHost section, it''ll be easier for us to help. > > Curt > > _______________________________________________ > Instantrails-users mailing list > Instantrails-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/instantrails-usersThanks for responding. Here''s my VirtualHost section: <VirtualHost *> ServerName www.myapp.net # handle all requests through SCGI SCGIMount / 127.0.0.1:9999 DocumentRoot ${path}/rails_apps/myapp/public <Directory ${path}/rails_apps/myapp/public> Options +FollowSymLinks Order allow,deny allow from all </Directory> AddDefaultCharset utf-8 ErrorDocument 500 ${path}/rails_apps/myapp/public/500.html ErrorDocument 404 ${path}/rails_apps/myapp/public/404.html # matches locations with a dot following at least one more characters, # that is, things like *.html, *.css, *.js, which should be delivered # directly from the filesystem. Also matches the following # subdirectories: images, javascript(s), stylesheets <LocationMatch ^/(images|javascript|javascripts|stylesheets|[^/]+\.[^/]+$)> # don''t handle those with SCGI SCGIHandler Off </LocationMatch> <LocationMatch "^/$"> # don''t handle just / with SCGI SCGIHandler Off </LocationMatch> </VirtualHost> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051123/05827762/attachment.htm
David Morton
2005-Nov-23 18:06 UTC
[Instantrails-users] Redirect remains from cookbook app
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dumb question: Did you restart apache? - -- David Morton Maia Mailguard - http://www.maiamailguard.com Morton Software Design and Consulting - http://www.dgrmm.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDhK+0SIxC85HZHLMRArOTAJwN5mou2Eq0R60FpuP8RR2QfFqZTwCeOzaC MfZRQA8gQ0KpCQ8VRRRQqtM=qgr7 -----END PGP SIGNATURE-----
Apache uses the very first VirtualHost in the config file as its default -- the one that it uses when it doesn''t have a matching host name. Try putting your app''s VirtualHost section first. Curt On 11/23/05, da pendragon <dapendragon at gmail.com> wrote:> > > > On 11/23/05, Curt Hibbs <curt.hibbs at gmail.com> wrote: > > > On 11/23/05, da pendragon <dapendragon at gmail.com> wrote: > > > > > > Hi, I''m just getting started with Ruby on Rails, and InstantRails was > > > the perfect solution for me to get up and running with Ruby on Rails fast. > > > However, I''ve run into a small problem: I''ve created a new app, but whenever > > > I access it using an invalid URL or just the mysite.com/ (using a > > > virtual server) directory, apache tries to redirect me to the cookbook > > > tutorial app. I''ve removed the virtual server settings in httpd.conf, > > > and set the proper path in .htaccess, but I still get redirected. What am I > > > missing? > > > > > > Did you set the DocumentRoot & Directory directives in you new app''s > > VirtualHost section? > > > > If you posted your VirtualHost section, it''ll be easier for us to help. > > > > Curt > > > > _______________________________________________ > > Instantrails-users mailing list > > Instantrails-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/instantrails-users > > > > Thanks for responding. Here''s my VirtualHost section: > > <VirtualHost *> > ServerName www.myapp.net > # handle all requests through SCGI > SCGIMount / 127.0.0.1:9999 > DocumentRoot ${path}/rails_apps/myapp/public > <Directory ${path}/rails_apps/myapp/public> > Options +FollowSymLinks > Order allow,deny > allow from all > </Directory> > AddDefaultCharset utf-8 > ErrorDocument 500 ${path}/rails_apps/myapp/public/500.html > ErrorDocument 404 ${path}/rails_apps/myapp/public/404.html > # matches locations with a dot following at least one more characters, > # that is, things like *.html, *.css, *.js, which should be > delivered > # directly from the filesystem. Also matches the following > # subdirectories: images, javascript(s), stylesheets > <LocationMatch > ^/(images|javascript|javascripts|stylesheets|[^/]+\.[^/]+$)> > # don''t handle those with SCGI > SCGIHandler Off > </LocationMatch> > <LocationMatch "^/$"> > # don''t handle just / with SCGI > SCGIHandler Off > </LocationMatch> > </VirtualHost> > > > > > _______________________________________________ > Instantrails-users mailing list > Instantrails-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/instantrails-users > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051123/7527cde5/attachment-0001.htm