Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

CGI problems with Sh and Boa

My CGI get request is not working. Following the information on the form I used the shell script with the echo command to test the server side.

1. test.cgi will only run on the server if I type in "sh test.cgi" at the command prompt# . Does BOA automatically equate a CGI extension to sh?

2. Does Boa have to be configured for CGI or do the defaults take care of it? The config file appears correct.

3. Should the CGI Form action look more like action="sh?cgi-bin/test.cgi" ?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    AFAIK, the webserver in busybox needs to be run in a directory with cgi-bin in the path. As for the boa configuration, I'm not certain. I am sure it is documented properly.

    This si what in my nios2 configuration (running C programs):

    Port 80
    User root
    Group root
    ServerName www.board.com
    DocumentRoot /home/webserver/
    DirectoryIndex index.html
    KeepAliveMax 1000
    KeepAliveTimeout 10
    MimeTypes /etc/mime.types
    DefaultType text/plain
    CGIPath /bin:/usr/bin:/usr/local/bin
    ScriptAlias /cgi-bin/ /home/webserver/cgi-bin/

    Check that /bin/ is in your CGIPath. I don't think that boa requires a certain extension to be a valid cgi script.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Where is CGIPath /bin:/usr/bin:/usr/local/bin located? boa.conf does not appear to use it.