Moxa V2406-T-LX [31/81] Disabling the cgi function

Moxa V2406-LX [31/81] Disabling the cgi function
V2406/2422/2426 Linux User’s Manual Managing Communications
3-7
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. Mount the root file system with write permission.
MOXA:~# mount -o remount,rw
2. Type
# vi/etc/apache2/sites-enabled/000-default to edit the configuration file. Comment out
the following lines:
#ScriptAlias /cgi-bin/ /var/www/apache2-default/cgi-bin/
#<Directory “/var/www/apache2 default/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/apache2-default/cgi-bin/
#<Directory “/var/www/apache2 default/cgi-bin/”>
# AllowOverride None
# Options ExecCGI -MultiViews +SymLinksIFOwnerMatch
# #Order allow,deny
# Order deny,allow
# Allow from all
#</Directory>
3. After you finish writing or modifying the code, remember to execute umount /to change the root
directory back to Read-only mode.
MOXA:~# umount /
4. Re-start the apache server.
MOXA:~# /etc/init.d/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.

Содержание

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

Скачать