Revision 9 - 2012-08-01 at 21:24:24 Rolled Back (Current: 7)

MojoMojo Running via External FastCGI

Overview

MojoMojo is avant-garde wiki software that uses the Catalyst Framework and a buttload of CPAN modules. External FastCGI is useful for separating the application processes from the web server. MojoMojo, being a Catalyst application, gives you a FastCGI enabled application for free. Once you've gotten MojoMojo installed, it's easy as pie to configure apache to use external FastCGI instances of MojoMojo. Read on to find out how. Jam Tangan Murah timbangan Penumbuh Rambut Bisnis Modal Kecil

FastCGI

Overview

FastCGI is an CGI done right. It is designed to improve peformance and scalability of CGI. A distinct advantage of running FastCGI instances in their own process space is the separation of application processes from the web server. Thus application restarts don't require web server restarts which is real handy for times when the site is busy but the application must be restarted.

Configuration

  • Perl Modules: FCGI and FCGI::ProcManager
  • Apache module: mod_fastcgi - installed from debian package: libapache2-mod-fastcgi
  • Enable the module with fastcgi.load and fastcgi.conf - start with nothing in fastcgi.conf
  • fastcgi.conf has handler directive: AddHandler fastcgi-script .fcgi - this is not needed for this example
  • add to a conf file: Use FastCGI in separate process on distinct host (local or remote)
FastCgiExternalServer /var/www/virtual-file.fcgi -host remote.host.org:3001
Alias /cia-wiki/ /var/www/virtual-file.fcgi/

The directories must exist but the filename is arbitary1.

  • Start the fastcgi processes:
mojomojo_fastcgi.pl -l :3001 -n 3 -p /home/hunter/mojo_fastcgi.pid -d

This starts 3 fastcgi instances on port 3001, puts a process id in the mojo_fastcgi.pid file and puts fastcgi in daemon mode.

  • Kill fastcgi processes: kill -TERM first process. Use -p option when starting to specify pid file.

Make an init script

I have not tested it yet, but it appears an init script for starting FastCGI Catalyst app. can be created using Catalyst::Helper::FastCGI::ExternalServer. Another possibility for managing FastCGI processes is FCGI::Engine::Manager

Addendum

A much more in-depth article about using external FastCGI server with Catalyst applications is available at "zzo's perl journal":http://use.perl.org/~zzo/journal/34146

Foot Notes

Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Safety Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Govr Edo Ziedo Portatile Apple RDAnet Lorks Karikatur Karikatur Murah Berita Terbaru Bisnis UKM Bisnis Ukm Yang Menguntungkan Bisnis Modal Kecil Usaha Modal Kecil Bisnis Modal Kecil Untung Besar Iklan Baris Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Jam Tangan Jam Tangan Murah Jam Tangan KW Jam Tangan Casio Grosir Baju Terbaru Grosir Baju Baju Terbaru Baju Murah Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk Kulit Social Bookmark Kumpulan Puisi Kumpulan Puisi Cinta bola hantu Penumbuh Rambut Penumbuh Rambut Penumbuh Rambut timbangan Timbangan Jasa SEO WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah Kata Gaul


  1. The absolute path must exist and be readable by the fastcgi process, but the filename at the end is virtual (just used for mapping of fastcgi process to the URI) so it can be anything. ↩

My tags:
 
Popular tags:
 
Powered by Catalyst