Welcome! Log In Create A New Profile

Advanced

Rewrite: fixing Metadot Kluginess

Paul Hamann
July 22, 2009 10:10PM
Greetings. I'm implementing portal software called Metadot. It was
orginally Perl -- ported to Rails about 1 yr ago. There's a bunch of
Perl-isms and silliness that makes it somewhat dependent on Apache2 /
fcgi.

I'm trying to use Nginx to proxy/balance dynamic requests to multiple
Apache2/Passenger servers. I want Nginx to serve up all static content
so that Aapche2 can serve just rails. They put attachments and images
in a separate directory outside the rails root. Then they pre-pended
the filename with 8 digits made up of zeros and the file's id. I want
to rewrite specific file formats to their actual filenames and dirs.

Example for user uploaded images. {png | ico | jpg | gif | etc.....}

request comes in as: /__metadot__/image_library/image.gif

maps to: ../../metadot-on-rails-attachments/00000001/00000022-image.gif

22 is the file id and image.gif is the [already unique] filename.
metadot-on-rails-attachments is at the same level as the rails root, not
inside it.

Please help! I've been lost on this all day.

Thanks! Paul
--
Posted via http://www.ruby-forum.com/.
Subject Author Posted

Rewrite: fixing Metadot Kluginess

Paul Hamann July 22, 2009 10:10PM

Re: Rewrite: fixing Metadot Kluginess

Igor Sysoev July 23, 2009 03:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 271
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready