E Gard
2005-Nov-16 18:48 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics.
Hi Instant Rails Users, I was working with typo themes and the graphics for each theme wasn''t showing. The httpd.conf file needs another adjustment so that themes in typo will work. Remove the "images" from the "don''t use SCGI" section below. I had removed the "stylesheets" earlier. Hope this helps anyone using Instant Rails and Typo. Ed #****************************** typo 2.6.0 **************************************** <VirtualHost *> ##### TYPO ##### ServerName typo260 # handle all requests through SCGI SCGIMount / 127.0.0.1:9990 DocumentRoot ${path}/rails_apps/typo-2.6.0/public <Directory ${path}/rails_apps/typo-2.6.0/public> Options +FollowSymLinks Order allow,deny allow from all </Directory> AddDefaultCharset utf-8 ErrorDocument 500 /500.html ErrorDocument 404 /404.html # (*** CHANGE FOR TYPO ***) # For Typo, removed stylesheets and images in list below - Ed Gard 11/16/05 # The routing for themes uses SCGI to retreive stylesheets and associated # image files. (The pics, pic2, audio, and pdf are static content I''ve # added to my own typo blog and don''t use SCGI!) # (*** CHANGE FOR TYPO ***) <LocationMatch ^/(javascript|javascripts|pics|pic2|audio|pdf|[^/]+\.[^/]+$)> # don''t handle those with SCGI SCGIHandler Off </LocationMatch> </VirtualHost> --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051116/178b5a18/attachment.htm
Curt Hibbs
2005-Nov-16 19:37 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics.
Thanks for posting this. I''m planning to include typo as a preinstaled sample app in Instant Rails, and your experience will definitely save me a bunch of time. curt On 11/16/05, E Gard <x2egard at yahoo.com> wrote:> > Hi Instant Rails Users, > > I was working with typo themes and the graphics for each theme wasn''t > showing. > > The httpd.conf file needs another adjustment so that themes in typo will > work. Remove the "images" from the "don''t use SCGI" section below. I had > removed the "stylesheets" earlier. > > Hope this helps anyone using Instant Rails and Typo. > > Ed > > > #****************************** typo 2.6.0**************************************** > <VirtualHost *> > ##### TYPO ##### > ServerName typo260 > # handle all requests through SCGI > SCGIMount / 127.0.0.1:9990 <http://127.0.0.1:9990> > > DocumentRoot ${path}/rails_apps/typo-2.6.0/public > <Directory ${path}/rails_apps/typo-2.6.0/public> > Options +FollowSymLinks > Order allow,deny > allow from all > </Directory> > AddDefaultCharset utf-8 > ErrorDocument 500 /500.html > ErrorDocument 404 /404.html > > > # (*** CHANGE FOR TYPO ***) > # For Typo, removed stylesheets and images in list below - Ed Gard > 11/16/05 > # The routing for themes uses SCGI to retreive stylesheets and associated > # image files. (The pics, pic2, audio, and pdf are static content I''ve > # added to my own typo blog and don''t use SCGI!) > # (*** CHANGE FOR TYPO ***) > <LocationMatch > ^/(javascript|javascripts|pics|pic2|audio|pdf|[^/]+\.[^/]+$)> > # don''t handle those with SCGI > SCGIHandler Off > </LocationMatch> > > </VirtualHost> > > ------------------------------ > Yahoo! FareChase - Search multiple travel sites in one click.<http://farechase.yahoo.com/> > > > _______________________________________________ > 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/20051116/af58a166/attachment-0001.htm
David Morton
2005-Nov-16 21:30 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Curt Hibbs wrote:> Thanks for posting this. I''m planning to include typo as a preinstaled > sample app in Instant Rails, and your experience will definitely save me > a bunch of time.On that note.... I''m working with a couple others on a problem related to typo and scgi... Either some routing code has to be rewritten or some other patch to make caching work with scgi. If you mount scgi on the root url: SCGIMount / 127.0.0.1:9999 then all requests are passed into SCGI, and cached pages are not scooped up by the webserver correctly. No caching! ack! The workaround is to mount SCGI on a sub-folder: SCGIMount /scgi-bin/ 127.0.0.1:9998 and then use mod_rewrite to map things over if the file doesn''t exist: RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /scgi-bin/$1 [QSA,L] But now all your application urls have a /scgi-bin/ prefix on them, so you have to mess with routes to clean it up. A messy business for typo, because it uses quite a few routes. What I propose, but haven''t figured out yet, is some sort of map.base_path(''/scgi-bin'') that would automatically be stripped out of the request string before further processing. - -- 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 iD8DBQFDe6TrSIxC85HZHLMRAihHAJ9klFuSMBpptwF8WXvbd/rWz3ygsQCeLvNx D5NCXsXu4C4MblLE/QzsdEI=jcv4 -----END PGP SIGNATURE-----
Curt Hibbs
2005-Nov-16 22:40 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics.
You obviously know more about this than I do. I will follwo your lead! Curt On 11/16/05, David Morton <mortonda at dgrmm.net> wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Curt Hibbs wrote: > > Thanks for posting this. I''m planning to include typo as a preinstaled > > sample app in Instant Rails, and your experience will definitely save me > > a bunch of time. > > On that note.... I''m working with a couple others on a problem related to > typo > and scgi... Either some routing code has to be rewritten or some other > patch to > make caching work with scgi. If you mount scgi on the root url: > > SCGIMount / 127.0.0.1:9999 <http://127.0.0.1:9999> > > then all requests are passed into SCGI, and cached pages are not scooped > up by > the webserver correctly. No caching! ack! > > The workaround is to mount SCGI on a sub-folder: > > SCGIMount /scgi-bin/ 127.0.0.1:9998 <http://127.0.0.1:9998> > > and then use mod_rewrite to map things over if the file doesn''t exist: > > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ /scgi-bin/$1 [QSA,L] > > But now all your application urls have a /scgi-bin/ prefix on them, so you > have > to mess with routes to clean it up. A messy business for typo, because it > uses > quite a few routes. > > What I propose, but haven''t figured out yet, is some sort of > map.base_path(''/scgi-bin'') that would automatically be stripped out of the > request string before further processing. > > - -- > 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 > > iD8DBQFDe6TrSIxC85HZHLMRAihHAJ9klFuSMBpptwF8WXvbd/rWz3ygsQCeLvNx > D5NCXsXu4C4MblLE/QzsdEI> =jcv4 > -----END PGP SIGNATURE----- > _______________________________________________ > 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/20051116/f48b3898/attachment.htm
Eric Lund
2005-Nov-17 00:19 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics.
Hi, Thanks for your tips on getting Typo running in Instant Rails. I''m JUST getting my feet wet and Instant Rails has been great! I''ve just set up Typo 2.6.0 in Instant Rails preview5 and I''ve been to resolve all my issues so far with your advice. I wanted to follow up that when I removed "images" from the "don''t use SCGI" section it did fix the problem with the theme graphics, but it broke the graphics for the admin pages! I''m still wrapping my head around all this and but it seems that if instead of removing ''images'' from the list, I change it to ''images/admin'' then the graphics work on both the admin pages and the blog itself. Not sure that''s the best fix (indeed I''m not really sure what I did!), but a fix nonetheless. Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051116/8b369fd9/attachment.htm
E Gard
2005-Nov-17 01:25 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics. (Second Try)
Hi, Well, my first atempt to fixing the theme''s graphics issues has caused more trouble. Without lots of messing typo, it doesn''t work!. The public/images folder MUST be excluded from SCGI, but not the "images" folders under the themes folder. So, another attempt: <LocationMatch ^/(public/images|javascript|javascripts|pics|pic2|audio|pdf|[^/]+\.[^/]+$)> # don''t handle those with SCGI SCGIHandler Off </LocationMatch> Notice the "public/images" above. This excludes the static images in Typo, but allows the "images" under the themes to be served by SCGI and the rails routing. Hopefully, this fixes the themes graphics and doesn''t break ALL of the static image links in Typo. P.S. If you are using themes other than the Typo default, you''ll need to fix the layout/default.rhtml file to match the updated one in the default theme (azure). Eric Lund <eric at coolworks.com> wrote: Hi, Thanks for your tips on getting Typo running in Instant Rails. I''m JUST getting my feet wet and Instant Rails has been great! I''ve just set up Typo 2.6.0 in Instant Rails preview5 and I''ve been to resolve all my issues so far with your advice. I wanted to follow up that when I removed "images" from the "don''t use SCGI" section it did fix the problem with the theme graphics, but it broke the graphics for the admin pages! I''m still wrapping my head around all this and but it seems that if instead of removing ''images'' from the list, I change it to ''images/admin'' then the graphics work on both the admin pages and the blog itself. Not sure that''s the best fix (indeed I''m not really sure what I did!), but a fix nonetheless. Thanks, Eric _______________________________________________ Instantrails-users mailing list Instantrails-users at rubyforge.org http://rubyforge.org/mailman/listinfo/instantrails-users --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051116/7b7c85ee/attachment.htm
E Gard
2005-Nov-17 05:39 UTC
[Instantrails-users] Typo 2.6.0: Typo Themes missing graphics. (Third and hopefully the last Try!)
OK, OK, OK.... First, the admin isn''t working, then the blog isn''t working. The issue, two images folders, one in public and one in the theme. Here are the Third Try steps: 1) From a previous older post To get the admin stylesheet to work with a theme a) Move public/stylesheets/admin.css to themes/azure/stylesheets b) Edit /config/routes.rb and add the following line to the file: map.connect ''stylesheets/:filename'', :controller => ''theme'', :action => ''stylesheets'' ( I added the above at line 60 in the file) 2) Change ALL image refs in themes/azure/stylesheets/azure.css OLD url(../../images NEW url(../../theme_images This avoids the conflict with the "images" in the httpd.conf file. 3) Revert the httpd.conf file back to: #****************************** typo 2.6.0 **************************************** <VirtualHost *> ##### TYPO ##### ServerName typo260 # handle all requests through SCGI SCGIMount / 127.0.0.1:9990 # (*** CHANGE #1 FOR TYPO ***) # Changed to Typo folder (typo-2.5.6) - Ed Gard 10/15/05 DocumentRoot ${path}/rails_apps/typo-2.6.0/public <Directory ${path}/rails_apps/typo-2.6.0/public> Options +FollowSymLinks Order allow,deny allow from all </Directory> AddDefaultCharset utf-8 ErrorDocument 500 /500.html ErrorDocument 404 /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 # (*** CHANGE #2 FOR TYPO ***) # For Typo, removed stylesheets in list below - Ed Gard 10/16/05 <LocationMatch ^/(images|javascript|javascripts|pics|pic2|audio|pdf|[^/]+\.[^/]+$)> # don''t handle those with SCGI SCGIHandler Off </LocationMatch> </VirtualHost> Once again, I am eager to see what others have come up with while working with Typo. Did the above really solve the theme issues? My Typo blog appears, now, to be working correctly, but that may not mean much... E Gard <x2egard at yahoo.com> wrote: Hi, Well, my first atempt to fixing the theme''s graphics issues has caused more trouble. Without lots of messing typo, it doesn''t work!. The public/images folder MUST be excluded from SCGI, but not the "images" folders under the themes folder. So, another attempt: <LocationMatch ^/(public/images|javascript|javascripts|pics|pic2|audio|pdf|[^/]+\.[^/]+$)> # don''t handle those with SCGI SCGIHandler Off </LocationMatch> Notice the "public/images" above. This excludes the static images in Typo, but allows the "images" under the themes to be served by SCGI and the rails routing. Hopefully, this fixes the themes graphics and doesn''t break ALL of the static image links in Typo. P.S. If you are using themes other than the Typo defa! ult, you''ll need to fix the layout/default.rhtml file to match the updated one in the default theme (azure). Eric Lund <eric at coolworks.com> wrote: Hi, Thanks for your tips on getting Typo running in Instant Rails. I''m JUST getting my feet wet and Instant Rails has b! een great! I''ve just set up Typo 2.6.0 in Instant Rails preview5 and I''ve been to resolve all my issues so far with your advice. I wanted to follow up that when I removed "images" from the "don''t use SCGI" section it did fix the problem with the theme graphics, but it broke the graphics for the admin pages! I''m still wrapping my head around all this and but it seems that if instead of removing ''images'' from the list, I change it to ''images/admin'' then the graphics work on both the admin pa! ges and the blog itself. Not sure that''s the best fix (indeed I''m not really sure what I did!), but a fix nonetheless. Thanks, Eric _______________________________________________ Instantrails-users mailing list Instantrails-users at rubyforge.org http://rubyforge.org/mailman/listinfo/instantrails-users --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. _______________________________________________ Instantrails-users mailing list Instantrails-users at rubyforge.org http://rubyforge.org/mailman/listinfo/instantrails-users --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051116/5db75233/attachment-0001.htm