Forum Discussion
Web Server
Hello,
I'm using the uCLinux ported by Microtronix. I'm trying to use the web server but I can't see the initial page. I use the open core ethernet. I built the filesystem as described in the linux quick start guide. I can use ftp and telnet but when I type the IP in the web browser, I can't see the web page. Can someone help me? Thanks a lot, Marco19 Replies
- Altera_Forum
Honored Contributor
If you log in and run ps, does boa appear in the process list?
- Altera_Forum
Honored Contributor
boa is running
I have also started boa with boa -c /home/httpd - Altera_Forum
Honored Contributor
A silly question, but /home/httpd does have stuff, and you're either running boa as root or have the permissions set properly?
- Altera_Forum
Honored Contributor
- under /home/httpd are the files index.html and ukit.jpg (Microtronix example)
- boa is started by rc script (see below). In difference to the example, I added the line /bin/ifconfig... # !/bin/sh# # system startup. # set up the hostname /bin/hostname Nios2 # expand and mount the ramdisk /bin/expand /ramfs.img /dev/ram0 /bin/mount -t ext2 /dev/ram0 /var -n /bin/expand /ramfs.img /dev/ram1 /bin/mount -t ext2 /dev/ram1 /tmp -n # mount proc file system /bin/mount -t proc proc /proc -n # mount sysfs /bin/mount -t sysfs sysfs /sys -n # manually assign ip address (uncomment and edit as appropriate)# note: first ifattach (no args) sets local loopback /bin/ifattach# /bin/ifattach --addr 10.1.1.99 --mask 255.255.255.0 --net 10.1.1.0 --gw 10.1.1.11 --if eth0 /bin/ifconfig eth0 192.168.1.239 netmask 255.255.255.0 # try and get ip address automatically...# /bin/mkdir /var/dhcpc# /bin/dhcpcd -NRY & # start up the internet superserver /bin/inetd & # start up the web server /bin/boa & # mount Linux server:# (uncomment and edit as appropriate)# /bin/mount -t nfs 192.168.1.30:/home /mnt/nfs -n -o nolock # mount master ide disk partition(s):# (uncomment and edit as appropriate)# /bin/mount /dev/hda1 /mnt/ide0 -n # that's it... success exit 0 - Altera_Forum
Honored Contributor
and what are the contents of /home/httpd/?
- Altera_Forum
Honored Contributor
In home/httpd there are only the files index.html and ukit.jpg
index.html is a html script. These files are working. - Altera_Forum
Honored Contributor
Ok, can you be more clear about how you don't see the web page? Do you get a 404 response? Does the query time out and you get nothing?
- Altera_Forum
Honored Contributor
When I enter the IP in the web browser, the browser found the IP, but the site is not loaded.
I have logged the network traffic (with Ethereal). The traffic stopped after 5 packets. I can't attach the log-file today, because it's located on another PC. - Altera_Forum
Honored Contributor
What is the result if you try it manually, i.e. from some other (preferably unix) computer:
<div class='quotetop'>QUOTE </div> --- Quote Start --- telnet [ip of board] 80 GET / HTTP/1.1 Host: [ip of board][/b] --- Quote End --- (note that you have to hit enter twice after the Host: line. What do you get back, if anything? (note: you're using telnet to be an HTTP/1.1 client with the board as server; you can do this from the board itself if that's your only unix system available.) - Altera_Forum
Honored Contributor
I have captured the ethernet packets, as I called the website.
There are 2 HTTP Packets 1. packet GET /index.html HTTP/1.1 2. packet Continuation The second packet includes the last 77bytes of index.html. But where is the beginning data from index.html? Next, I tried to create a new smaller index.html. <html> <head><title>Test</title></head> <body bgcolor="white" text="black"> <td>Hello</td> </body> </html> J copied this new index.html into home/httpd Now I can see it in the web browser. As I now captured the traffic, I saw 2 packets again. 1. packet GET /index.html HTTP/1.1 2. packet HPPT/1.0 200 OK (text/html) This 2. packet includes the index.html. Whats wrong with the bigger index.html? Where is the first data? And what is the packet Continuation?