[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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
>
> ----- Original Message -----
> From: <B.Ashraf@xxxxxxx.uk>
> To: <dev-etrax@xxxxxxx.com>
> Sent: Friday, February 28, 2003 12:07 PM
> Subject: accessing programs through CGI
>
>
> > Dear Friends
> >
> > 1. How do I access programs in /bin directory from index.html?
> >
> > I tried the following
> > <A HREF="/bin/readbits">Test the GPIO</a>
> >
> > But the following message appears
> >
> > The requested URL was not found on the server. Error 404 Not Found
> >
> > 2. If i have to add this program to admin-bin directory how can I do
> that?
> >
> > cheers
> > bilal
> >
> >
>
>
>
>