After you've installed MojoMojo, you will want to configure the web server. The guides below should help.
Since MojoMojo is a Catalyst application, you can use Catalyst's built-in HTTP server for standalone deployment. Catalyst::Engine::HTTP::Prefork is a high-performance pre-forking Catalyst engine and recommended:
CATALYST_ENGINE='HTTP::Prefork' script/mojomojo_server.pl
Catalyst versions prior to 5.8 are limited in that your application can only reside at / (more details and a workaround at Catalyst and nginx). An alternative is to create a subdomain for your wiki. Here is an example nginx configuration for my wiki:
server {
server_name ~wiki.dandascalescu.(com|org|net) wiki.dascalescudan.com; access_log logs/wiki.access;
error_log logs/wiki.error error; location /robots.txt {
alias /home/dan/mojomojo.prod/root/static/robots.txt;
} location / {
include fastcgi_params;
fastcgi_pass 127.0.0.1:55900;
} location /.static/ {
alias /home/dan/mojomojo.prod/root/static/;
access_log /dev/null;
}
}
FileThe /etc/nginx/fastcgi_params nginx config file should contain:
fastcgi_param PATH_INFO $fastcgi_script_name;
it should NOT contain:
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
If your file has both, you will see odd behavior with mojomojoMojoMojo urlsURLs appending over and over (.view/.view/.view) etc. Comment SCRIPT_NAME out.
The mojomojo server is, basically, run as an external FastCGI server:
cd /home/dan/mojomojo.prod
script/mojomojo_fastcgi.pl -listen 127.0.0.1:55900 -nproc 5 -keeperr 2>>log/error.log &
For a robust configuration, use the start/stop init script from the lighttpd deployment page.
Since MojoMojo is a Catalyst application, please see the Catalyst deployment page on the Catalyst wiki.