简体   繁体   中英

VisualAge Smalltalk Web Connect and Nginx

I have a web app developed in VisualAge Smalltalk that uses the ABTWSAC (Web Connect) to do CGI Handling.

In Apache, I simply AddHandler cgi-script .exe in mime module and Options -Indexes FollowSymLinks ExecCGI in Directory module.

(There is also a ISAPI handler that works in IIS).

How on earth do you do this in nginx? Nginx seems to always want a running service on a port or a 'unix' socket (which is clearly not support on windows).

All the googling shows that people assume cgi in nginx must be PHP. None of the examples or explinations tell me how to do what I want to do specifically.

As far as I know Nginx does not have native CGI support. It supports "only" fastCGI.

In my eyes you have four options:

1) Change from ABTWSAC (Web Connect) to seaside. Then use seaside with VisualAge Smalltalk. I would go with this guide

Copied from the link for later reference:

Our Bare Bones Nginx FastCGI Configuration

worker_processes 1;

events
{
  worker_connections  1024;
}

http
{
  include       mime.types;
  default_type  application/octet-stream;

  upstream seaside 
  {
    server localhost:9001;
    server localhost:9002;
    server localhost:9003;
  }

  server
  {
    root /var/www/glass/;

    location /
    { 
      error_page 403 404 = @seaside;
    }

    location @seaside
    {
      include fastcgi_params;
      fastcgi_pass seaside;
    }
  }
}

2) Reverse proxy to Seaside (again requiring switching from ABTWSAC (Web Connect)), for more see this link

3) Install Apache or lighthttpd, different port than ngnix, on the same server. You want to proxy cgi-bin folder via nginx. I know it kind of beats the purpose for having nginx only, but it is also a possible solution so I'm writing it here.

You can write to your nginx (running on 8888 port) configuration:

location /cgi-bin {
    proxy_pass http://127.0.0.1:8888
}

4) As you already suggested running web server with native CGI support like your mentioned apache or lighthttpd .

Dusty,

If I remember correctly, you can also use Web Connect on Top of SST, which basically is just an in-image HTTP server. So your Web server (nginx) only needs to act as an HTTP (Reverse) Proxy. It is not faster than fastCGI but requires only minimal changes to your Web Connect setup process in the image startup procedure...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM