Jean-Christophe Michel
2005-Oct-21 08:38 UTC
SCGI + apache2 not rendering subdirs in images/
SCGI 0.4.2 apache2 + mod_scgi 1.7 + mod_proxy debian unstable Using the vhost described here http://zedshaw.com/projects/scgi_rails/apache.html (bottom of page). I cannot see images placed in subdirs, whereas it works with webbrick. I tried many LocationMatch lines without much benefit. Current one is: <LocationMatch "\.(jpg|gif|png|css|pdf|zip|tgz|bz2|html|mp3|gif)$"> In /var/log/apache2/access.log, I get : 127.0.0.1 - "GET /images/foo/bar.jpg HTTP/1.1" 403 127.0.0.1 - "GET /stylesheets/style.css HTTP/1.1" 200 127.0.0.1 - "GET /images/logo.gif HTTP/1.1" 200 Any idea ? Seems scgi related. But maybe it''s vhost :/ -- Jean-Christophe Michel
Did you look at the various logs for any clues? Curt On 10/21/05, Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/w@public.gmane.org> wrote:> > SCGI 0.4.2 > apache2 + mod_scgi 1.7 + mod_proxy > debian unstable > > Using the vhost described here > http://zedshaw.com/projects/scgi_rails/apache.html > (bottom of page). > > I cannot see images placed in subdirs, whereas it works with webbrick. > > I tried many LocationMatch lines without much benefit. Current one is: > > <LocationMatch "\.(jpg|gif|png|css|pdf|zip|tgz|bz2|html|mp3|gif)$"> > > > In /var/log/apache2/access.log, I get : > > 127.0.0.1 <http://127.0.0.1> - "GET /images/foo/bar.jpg HTTP/1.1" 403 > 127.0.0.1 <http://127.0.0.1> - "GET /stylesheets/style.css HTTP/1.1" 200 > 127.0.0.1 <http://127.0.0.1> - "GET /images/logo.gif HTTP/1.1" 200 > > > Any idea ? Seems scgi related. But maybe it''s vhost :/ > > -- > Jean-Christophe Michel > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
This is most likely an Apache configuration problem as under lighttpd I don''t have this problem. I''m currently collecting the configurations people are sharing around the list and will try to create a config generator. Hopefully that will solve problems like this, but please keep looking at this and send me any solutions you find. Zed A. Shaw http://www.zedshaw.com/ On Fri, 21 Oct 2005 10:38:25 +0200 Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/w@public.gmane.org> wrote:> SCGI 0.4.2 > apache2 + mod_scgi 1.7 + mod_proxy > debian unstable > > Using the vhost described here > http://zedshaw.com/projects/scgi_rails/apache.html > (bottom of page). > > I cannot see images placed in subdirs, whereas it works with webbrick. > > I tried many LocationMatch lines without much benefit. Current one is: > > <LocationMatch "\.(jpg|gif|png|css|pdf|zip|tgz|bz2|html|mp3|gif)$"> > > > In /var/log/apache2/access.log, I get : > > 127.0.0.1 - "GET /images/foo/bar.jpg HTTP/1.1" 403 > 127.0.0.1 - "GET /stylesheets/style.css HTTP/1.1" 200 > 127.0.0.1 - "GET /images/logo.gif HTTP/1.1" 200 > > > Any idea ? Seems scgi related. But maybe it''s vhost :/ > > -- > Jean-Christophe Michel > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Well, you''re getting a 403, so I would suggest looking at permissions.> From: Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/w@public.gmane.org> > Reply-To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Date: Fri, 21 Oct 2005 10:38:25 +0200 > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Subject: [Rails] SCGI + apache2 not rendering subdirs in images/ > > SCGI 0.4.2 > apache2 + mod_scgi 1.7 + mod_proxy > debian unstable > > Using the vhost described here > http://zedshaw.com/projects/scgi_rails/apache.html > (bottom of page). > > I cannot see images placed in subdirs, whereas it works with webbrick. > > I tried many LocationMatch lines without much benefit. Current one is: > > <LocationMatch "\.(jpg|gif|png|css|pdf|zip|tgz|bz2|html|mp3|gif)$"> > > > In /var/log/apache2/access.log, I get : > > 127.0.0.1 - "GET /images/foo/bar.jpg HTTP/1.1" 403 > 127.0.0.1 - "GET /stylesheets/style.css HTTP/1.1" 200 > 127.0.0.1 - "GET /images/logo.gif HTTP/1.1" 200 > > > Any idea ? Seems scgi related. But maybe it''s vhost :/ > > -- > Jean-Christophe Michel > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Jean-Christophe Michel
2005-Oct-21 21:51 UTC
Re: SCGI + apache2 not rendering subdirs in images/
Hunter Hillegas wrote:> Well, you''re getting a 403, so I would suggest looking at permissions.Thks, you found it ;-) images/foo was 754 instead of 755 I was misled by the apache error log: [crit] [client 192.168.0.20] (13)Permission denied: .../public/images/foo/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable But this meant that my dir ''foo'' was not readable, not that there was a missing htaccess :( Sorry for the noise, and thks to Zed, scgi is the fastest way to run rails I found. -- Jean-Christophe Michel