Forum Discussion
Altera_Forum
Honored Contributor
21 years agoCGI?
Hello everyone:
Does the boa webserver ("pre-buit version" provided by Microtronix) support CGI ? In the directory:"/c/altera/kits/nios2/examples/software/linux/apps/boa/util", there are some files such as *.pl or cgi-test.cgi .....etc, Is that means those files are examples for writing perl CGI? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif24 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by rfitz25@Nov 11 2006, 07:01 AM hello,i'm a newbie. http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/rolleyes.gif
i just joined.
i'll try this example and post another reply later.
basically:
i'm trying to build a cgi app in c that will pipe scpi ascii strings to and from a web page(s) and rack of (<=96) modules (cycloneiii's) via one app on one master controller with altera cyclone i/nios ii/microtronix linux/etc.
all in a few weeks. lol
obviously i dont even know what the right questions to ask are yet. lol.
http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/biggrin.gif
i hope this is the right forum?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19373)
--- quote end ---
--- Quote End --- Welcome. The best advice is, ( shall I repeat again and again?) You should move to Linux PC, try out uClinux-dist as in Nios wiki. There is a working generic cgi example in uClinux-dist. It is totally wrong to develop Linux on a Windows machine. I believe you will need to move to Linux PC, sooner or later.
- Altera_Forum
Honored Contributor
Thanks for the feedback.
I understand moving to a Linux PC sounds like a good idea. However out here in the real world thats not always an option. So theres no need for you to continue repeating yourself. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif Anyway I'm back trying to get this project to compile. I may try the LED version for the dev boards. Thanks, Richard The best advice is, ( shall I repeat again and again?) You should move to Linux PC, try out uClinux-dist as in Nios wiki. There is a working generic cgi example in uClinux-dist. It is totally wrong to develop Linux on a Windows machine. I believe you will need to move to Linux PC, sooner or later. <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19381)</div> --- Quote End --- - Altera_Forum
Honored Contributor
You can run Linux parallel on Windows with vmwares vmplayer or install co-linux or the other way "xenify" linux to run windows parallel on linux or ....
you do not need a second workstation... but if you have another workstation, vnc is a nice option. - Altera_Forum
Honored Contributor
Hello,
I need some help on boa. On the uClinux-dist, I included boa in make menuconfg, then I did make romfs make make linux make image I can see /home/httpd and files inside it. When I start boa, and use a browser to point to it, it doesn't seem to display anything. Please help. My uClinux is /home/httpd> cat /proc/version Linux version 2.6.17-uc1 (uclinux@colinux) (gcc version 3.4.6)# 46 PREEMPT Wed Nov 15 06:59:46 EST 2006 - Altera_Forum
Honored Contributor
Hi,
What did you type in the browser ? Regards. --- Quote Start --- originally posted by albertyong88@Nov 15 2006, 01:15 PM hello,i need some help on boa. on the uclinux-dist, i included boa in make menuconfg, then i did
make romfs
make
make linux
make image
i can see /home/httpd and files inside it.
when i start boa, and use a browser to point to it, it doesn't seem to display anything.
please help.
my uclinux is
/home/httpd> cat /proc/version
linux version 2.6.17-uc1 (uclinux@colinux) (gcc version 3.4.6)# 46 preempt wed nov 15 06:59:46 est 2006
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19442)
--- quote end ---
--- Quote End ---
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by albertyong88@Nov 15 2006, 08:15 PM hello,i need some help on boa. on the uclinux-dist, i included boa in make menuconfg, then i did
make romfs
make
make linux
make image
i can see /home/httpd and files inside it.
when i start boa, and use a browser to point to it, it doesn't seem to display anything.
please help.
my uclinux is
/home/httpd> cat /proc/version
linux version 2.6.17-uc1 (uclinux@colinux) (gcc version 3.4.6)# 46 preempt wed nov 15 06:59:46 est 2006
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19442)
--- quote end ---
--- Quote End --- It should work with default uClinux-dist nios2 config. You need only to enable your ether driver. I have tested with both firefox browser and IE. check, 1. ifconfig, can you see your eth0 dev ? can you ping to/from your pc? 2. netstat -a , can you see http service ? 3. wget http://localhost/index.html (http://localhost/index.html) , try connect from local
- Altera_Forum
Honored Contributor
Hi hippo,
Checked that my http service is NOT on. I shall turn it on. Thanks for pointing out. - Altera_Forum
Honored Contributor
Hi,
I started http service by boa -c /home/httpd but, the browser doesn't display the page However, when I use telnet 192.168.1.239 80 GET /index_old.html HTTP/1.1(enter) Host: 192.168.1.239(enter) (enter) I get the following: <div class='quotetop'>QUOTE </div> --- Quote Start --- HTTP/1.0 200 OK Date: Tue, 30 Nov 1999 04:12:48 GMT Server: Boa/0.93.15 Connection: close Content-Type: text/html Content-Length: 333 Last-Modified: Tue, 30 Nov 1999 00:00:02 GMT <HTML> <HEAD> <TITLE>A test web page</TITLE> </HEAD> <BODY> <H1>Test Page</H1> If you are seeing this page, then your web server is working, and now you need to create some nice pages to replace this one :-). If everything has built correctly then the <A HREF=/cgi-bin/cgi_demo>CGI Demo</A> should be here. </BODY> </HTML> Connection closed by foreign host. uclinux@colinux:~$[/b] --- Quote End --- I am more confused now. Pls help. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by albertyong88@Nov 16 2006, 12:18 AM hi,i started http service by
boa -c /home/httpd
but, the browser doesn't display the page
however, when i use
telnet 192.168.1.239 80
get /index_old.html http/1.1(enter)
host: 192.168.1.239(enter)
(enter)
i get the following:
<div class='quotetop'>quote
--- quote end ---
--- quote start ---
http/1.0 200 ok
date: tue, 30 nov 1999 04:12:48 gmt
server: boa/0.93.15
connection: close
content-type: text/html
content-length: 333
last-modified: tue, 30 nov 1999 00:00:02 gmt
<html>
<head>
<title>a test web page</title>
</head>
<body>
<h1>test page</h1>
if you are seeing this page, then your web server is working, and now
you need to create some nice pages to replace this one :-).
if everything has built correctly then the
<a href=/cgi-bin/cgi_demo>cgi demo</a> should be here.
</body>
</html>
connection closed by foreign host.
uclinux@colinux:~$ --- Quote End --- I am more confused now. Pls help. <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19454)</div> [/b] --- Quote End --- Please start it over, make clean make menuconfig Kernel/Library/Defaults Selection--> [*] Default all settings (lose changes) Then build through the image, without touching anyother config. Then boot nios2, start boa with "boa &", and run the wget test (on nios2 , not your pc).
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo+nov 15 2006, 09:52 pm--><div class='quotetop'>quote (hippo @ nov 15 2006, 09:52 pm)</div>--- quote start ---
<!--quotebegin-albertyong88@Nov 16 2006, 12:18 AM hi,
i started http service by
boa -c /home/httpd
but, the browser doesn't display the page
however, when i use
telnet 192.168.1.239 80
get /index_old.html http/1.1(enter)
host: 192.168.1.239(enter)
(enter)
i get the following:
<div class='quotetop'>quote
--- quote end ---
--- quote start ---
http/1.0 200 ok
date: tue, 30 nov 1999 04:12:48 gmt
server: boa/0.93.15
connection: close
content-type: text/html
content-length: 333
last-modified: tue, 30 nov 1999 00:00:02 gmt
<html>
<head>
<title>a test web page</title>
</head>
<body>
<h1>test page</h1>
if you are seeing this page, then your web server is working, and now
you need to create some nice pages to replace this one :-).
if everything has built correctly then the
<a href=/cgi-bin/cgi_demo>cgi demo</a> should be here.
</body>
</html>
connection closed by foreign host.
uclinux@colinux:~$ --- Quote End --- I am more confused now. Pls help. <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19454)</div> [/b] --- Quote End --- Please start it over, make clean make menuconfig Kernel/Library/Defaults Selection--> [*] Default all settings (lose changes) Then build through the image, without touching anyother config. Then boot nios2, start boa with "boa &", and run the wget test (on nios2 , not your pc). <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19458)</div> [/b] --- Quote End --- Hippo, I don't get the wget test on nios2, what do you mean ?