Posts

Showing posts with the label nginx

Dancer + Nginx + FastCGI

Bring together the parts I was able to find complete documentation on running dancer  with nginx using FastCGI. In the dancer deployment  it discusses using Apache and fastcgi or nginx with proxy. Often, using nginx as proxy to starman(or some other plack webserver) is probably the right thing. But sometimes using fastcgi is good idea too :) I'm running some benchmarks but it seems like memory usage is a bit smaller with FCGI but I still need to do more digging on this. Make it so Lets get all the parts install and then configure them Install the Parts Note: These parts will be very dependent on your system. I'm assuming a debian/ubuntu system below. First you need to have nginx and dancer installed. For nginx i would recommend doing something like: apt-get install nginx or building and install from source.  Next, install need Perl modules: cpanm + Dancer's Makefile.PL I like to install using Dancer's app generated Makefile.PL along with cpanm ...

nginx include(s)

As part of my ongoing exploration with dotcloud , I've had to do a bit of learning about nginx . I've never worked with nginx before but i needed to add some rewrite rules into my dotcloud deployment. I wanted to make sure that static content like images and css files where being served by the nginx instead of my app ( Dancer is pretty nice about making sure public content gets served during requests ). I found that after changing a nginx include that the server needs to be restarted or reloaded after a change to the include. I spent a few hours trying to figure out if a restart was required since I wasn't sure if I had screwed up the rules due to a bug (now fixed) with dotcloud deployment not restarting it after a push as expected for Perl deployments. dotcloud provides server restart as: udo /etc/init.d/nginx restart __END__