Moxa V2616A-C5-CT-W7E [29/111] Disabling the cgi function

Moxa V2616A-C8-LX [29/111] Disabling the cgi function
V2616A Linux Managing Communications
3-7
/var/www
Save your CGI page to the following directory:
/var/www
Before you modify the homepage, use a browser (such as Microsoft Internet Explore or Mozilla Firefox) from
your PC to test if the Apache web server is working. Type the LAN1 IP address in the browsers address box to
open the homepage. For example, if the default IP address 192.168.3.127 is still active, type:
http://192.168.3.127/
To test the default CGI page, type:
http://192.168.3.127/cgi-bin/w3mmail.cgi
Disabling the CGI Function
The CGI function is enabled by default. If you want to disable the function, modify the file
/etc/apache2/sites-enabled/000-default.
1. Type # vi/etc/apache2/sites-enabled/000-default to edit the configuration file. Comment out the
following lines:
#ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#<Directory “/var/www/cgi-bin/”>
# AllowOverride None
# Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
# #Order allow,deny
# Order deny,allow
# Allow from all
#</Directory>
MOXA:/etc# vi /etc/apache2/sites-available/default
#ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#<Directory “/var/www/cgi-bin/”>
# AllowOverride None
# Options ExecCGI -MultiViews +SymLinksIFOwnerMatch
# #Order allow,deny
# Order deny,allow
# Allow from all
#</Directory>
2. Re-start the apache server.
moxa@MOXA:~# sudo service apache2 restart
ATTENTION
When you develop your own CGI application, make sure your CGI file is executable.
Saving Web Pages to a USB Storage Device
Some applications may have web pages that take up a lot of storage space. This section describes how to save
web pages to the USB mass storage device, and then configure the Apache web servers DocumentRoot to
open these pages. The files used in this example can be downloaded from Moxas website.
1. Prepare the web pages and then save the pages to the USB storage device. Click on the following link to
download the web page test suite: http://www.w3.org/MarkUp/Test/HTML401.zip.
2. Uncompress the zip file to your desktop PC, and then use FTP to transfer it to the V2616A-LX’s
/media/usb0 directory.

Содержание

Похожие устройства

Скачать