User`s manual

UC-7408 User’s Manual Managing Communication
4-5
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-7408’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#
Step 2:
Use the following commands to configure the Apache web server’s DocumentRoot:
#cd /etc/apache
#vi httpd.conf
……
DocumentRoot “/mnt/hda” //Change the document root directory
//to your CF card.
……
192.168.3.127 – PuTTY
ServerRoot “/etc/apache”
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/httpd.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
Listen 80
User nobody
Group nobody
ServerAdmin root@localhost
ServerName localhost
DocumentRoot “/mnt/had”
Step 3:
Use the following commands to restart the Apache web server:
#cd /etc/init.d
#./apache restart