Nginx choking on static files

4 views
Skip to first unread message

jwesonga

unread,
Aug 4, 2007, 11:54:35 AM8/4/07
to Deploying Rails
Hi Guys,

I'm running CentOS and I've successfully managed to setup a mongrel
cluster running on port 5000-5002 as well as Nginx for load balancing
and as a reverse proxy. Everything works okay the only problem is that
the Nginx is choking on static files like css,js and images that have
been appended the session data example: myapp.css?786565436897 I've
gone through the Nginx.conf file that Ezra at brainspl.at has posted
and that contains a fix for the particular issue, check it out here
http://brainspl.at/articles/2006/09/12/new-nginx-conf-with-rails-caching
but the problem persists. May be there is something I'm missing in my
Nginx.conf file, has anyone had the same problem and how did you fix
it?

Ezra Zygmuntowicz

unread,
Aug 4, 2007, 1:44:02 PM8/4/07
to rubyonrails...@googlegroups.com

> -~----------~----~----~----~------~----~------~--~---


Hi There-

Here is a current version of the config I use every day that works
fine with the ?3124321 timestamps. Give this one a whirl and see if
you hit the same problem.

http://pastie.caboo.se/84928

Replace 'username' with your username.

Cheers-
-- Ezra Zygmuntowicz
-- Founder & Ruby Hacker
-- e...@engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)


jwesonga

unread,
Aug 6, 2007, 5:49:02 AM8/6/07
to Deploying Rails
Pasted the config file and changed the username but the same problem
persists. Any idea why?

jwesonga

unread,
Aug 6, 2007, 8:02:37 AM8/6/07
to Deploying Rails
It seems to be working now I'm sot sure if the problem was this but I
changed the username and group to mongrel, the same username and group
that running the mongrel_cluster and everything seemed to work.

I've been trying to setup a startup script for the nginx cluster but
none of the commands seem to be working. I've already created the file
and copied it intomy /etc/init.d folder, i've chmod +x the nginx file
and when I run the sudo /sbin/chkconfig --level 345 nginx on I get an
error?!?

Reply all
Reply to author
Forward
0 new messages