Lasso Soft Inc. > Home

  • Articles

How to get nginx to talk with Lasso 9

I was able to get nginx to communicate with Lasso 9 with the following setup:
Mac OS X 10.6.6 (with Developer Tools installed)
Lasso 9 rev 1446
Nginx 0.8.54 (stable)

Below are the steps I took to set this up. (Note, you'll have to have the Developer Tools for Mac OS X installed.)

  1. Download the nginx source code from either http://www.nginx.org/ orhttp://wiki.nginx.org/Install
  2. Compile nginx from source. Below are the commands I ran, but you may want to vary the configuration for your purposes. (Each of these commands should be all on one line, and the "$> " is the prompt and not part of the command.)
$> cd ~/Downloads/nginx-0.8.54/
  
$> ./configure --without-http_autoindex_module --without-http_geo_module  
--without-http_scgi_module 
--without-http_uwsgi_module --with-http_ssl_module --user=www --group=www
  
$> make
 
$> sudo make install


This will install everything in /usr/local/nginx. Edit the configuration file /usr/local/nginx/conf/nginx.conf to have the following information:
 

worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
    
        server {
            listen       8080;
            server_name  localhost;
    
            location / {
                root   html;
                index  index.lasso index.html index.htm;
            }
    
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
    
            location ~ \.lasso9?$ {
                root           html;
                fastcgi_pass   127.0.0.1:8999;
                fastcgi_index  index.lasso;
                include        fastcgi_params;
                fastcgi_param  SCRIPT_FILENAME  /lasso9direct;
                fastcgi_param  SCRIPT_NAME  /lasso9direct;
                fastcgi_param  PATH_INFO $fastcgi_script_name;
                fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_script_name;
                fastcgi_param  Authorization $http_authorization;
                #fastcgi_pass_header  Authorization;
            }
            
            location ~ ^/lasso9(/.*)$ {
                fastcgi_pass   127.0.0.1:8999;
                include        fastcgi_params;
                fastcgi_param  SCRIPT_FILENAME  /lasso9;
                fastcgi_param  SCRIPT_NAME      /lasso9;
                fastcgi_param  PATH_INFO $1;
                fastcgi_param  PATH_TRANSLATED $document_root$1;
                fastcgi_param  Authorization $http_authorization;
                #fastcgi_pass_header  Authorization;
            }
        }
    }

 

  1. Unlike the default apache configuration, this configuration does not stop / start lassoserver when you stop / start nginx, so you'll need to start lassoserver yourself. (I recommend talking a look at the launchd guide for Mac OS X.)
  2. Start nginx with the following command:

     
$> sudo /usr/local/nginx/sbin/nginx

 

  1. Create a file at /usr/local/nginx/html/index.lasso with a body of '[date]'
  2. Visit http://localhost:8080/ (since we set listen to 8080) and you should get the current timestamp.
     

Author: Brad Lindsay
Created: 12 Jan 2011
Last Modified: 16 Mar 2011

Comments

No comments found
You must be logged in to comment.

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft