[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessing programs through CGI



Hi,

1) To use the one in /bin I think you still need to wrap it with a script
somewhere to send the HTTP headers using a similar ScriptAlias to before.

2) If you are not rebuilding the boa.conf from
/axis/devboard_lx/packages/param/boa/development then I would think you can
edit the one that is used to build the jffs:
/axis/devboard_lx/target/cris-axis-linux-gnu/mnt/flash/etc/httpd/conf/boa.co
nf

3) Looking at the line ScriptAlias /admin-bin/ /usr/html/admin-bin/ in
boa.conf so the file will be in
/axis/devboard_lx/target/cris-axis-linux-gnu/usr/html/admin-bin/

I am under the impression one of the make options rebuilds these from
/axis/devboard_lx/files/usr/html/admin-bin/ so you may want to check if they
are getting rebuilt.

Regards,

Chris Poole

----- Original Message -----
From: <B.Ashraf@xxxxxxx.uk>
To: <dev-etrax@xxxxxxx.com>
Sent: Friday, February 28, 2003 5:24 PM
Subject: Re: accessing programs through CGI


> Thanks,
>
> 1. But i would like to know how can i access the readbits program in the
/bin
> directory in the developer board. I donot want to create a directory
> in /mnt/flash.
>
> 2. I want to know in which directory should i edit the boa.conf before
'make
> files', 'make images' and './ktest' so that the settings are effective in
the
> developer board.
>
> 3. Also, in which directory should i add a file so that after 'make file
...',
> that file ends up in admin-bin directory.
>
> cheers
> bilal
>
> Quoting Chris Poole <Chris@xxxxxxx.Com>:
>
> > Hi Bilal,
> >
> > You can add the following line to /mnt/flash/etc/httpd/conf/boa.conf
> >
> >     ScriptAlias /bin/ /mnt/flash/html-bin/
> >
> > Create the directory /mnt/flash/html-bin
> >
> > Create a file readbits in /mnt/flash/html-bin containing the following
> >
> >     #!/bin/sh
> >     echo Content-Type: text/html
> >     echo
> >     echo '<html><pre>'
> >     readbits
> >     echo '</pre></html>'
> >
> > Then mark this file executable
> >
> >     chmod a+x readbits
> >
> > Then your example should work as expected.
> >
> > If you want to ensure you do not have problems with browser caching etc
> > you
> > can add some more headers to the script
> >
> >     #!/bin/sh
> >     echo Content-Type: text/html
> >     echo Expires: Tue, 17 Jun 1979 02:20:00
> >     echo Expires: 0
> >     echo Pragma: no-cache
> >     echo Cache-Control: no-cache
> >     echo
> >     echo '<html><pre>'
> >     readbits
> >     echo '</pre></html>'
> >
> > Hope that helps!
> >
> > Regards,
> >
> > Chris Poole