Saving a web page to the cf card – Moxa Technologies UC-7420/7410 User Manual

Page 56

Advertising
background image

UC-7420/7410 User’s Manual

Managing Communication

4-4

To open the default CGI test script report page, type http://192.168.3.127/cgi-bin/test-cgi in your
browser’s address box.

NOTE

The CGI function is enabled by default. If you want to disable the function, modify the file
/etc/apache/httpd.conf. When you develop your own CGI application, make sure your CGI file
is executable.

192.168.3.127 – PuTTY

root@Moxa:/usr/www/cgi-bin# ls –al
drwxr—xr-x 2 root root 0 Aug 24 1999
drwxr—xr-x 5 root root 0 Nov 5 16:16
-rwxr—xr-x 1 root root 268 Dec 19 2002

printenv

-rwxr—xr-x 1 root root 757 Aug 24 1999

test-cgi

root@Moxa:/usr/www/cgi-bin#

Saving a Web Page to the CF Card

Since some applications will have web pages that take up a lot of memory space, you will need to
be able to run the homepage and other pages from the CF card. In this section, we use a simple
example to illustrate how to save web pages to the CF card, and then configure the Apache web
server to open the pages. The files used in this example can be downloaded from Moxa’s website.

Step 1:
Prepare web page and put pages to CF card. Click on the following link to download the web page
test suite:

http://www.w3.org/MarkUp/Test/HTML401.zip

. Uncompress the zip file to your

desktop PC, and then use FTP to transfer it to UC-7420’s /mnt/hda directory.

192.168.3.127 – PuTTY

root@Moxa:/mnt/hda# ls –al
drwxr—xr-x 4 root root 16384 Dec 11 14:18
drwxr—xr-x 6 root root 0 Sep 29 17:43
-rwxr—xr-x 1 root root 1768 Dec 11 14:16

W3C.gif

drwxr—xr-x 2 root root 4096 Dec 11 14:19

assertions

-rwxr—xr-x 1 root root 36071 Dec 11 14:18

htmltestdocumen

taml

-rwxr—xr-x 1 root root 3145 Dec 11 14:16

index.html

-rwxr—xr-x 1 root root 90 Dec 11 14:17

section.css

drwxr—xr-x 2 root root 24576 Dec 11 14:20

tests

-rwxr—xr-x 1 root root 2303 Dec 11 14:16

vh401.gif

root@Moxa:/mnt/hda#

Advertising