Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

CGI problems with Sh and Boa

Altera_Forum
Honored Contributor II
1,636 Views

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" ?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
886 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
886 Views

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

0 Kudos
Reply