Moxa V2406-T-LX [31/81] Disabling the cgi function
![Moxa V2406-LX [31/81] Disabling the cgi function](/views2/1199466/page31/bg1f.png)
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 server’s DocumentRoot to
open these pages. The files used in this example can be downloaded from Moxa’s 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.
Содержание
- Second edition april 2011 1
- V2406 2422 2426 linux user s manual 1
- Www moxa com product 1
- Copyright notice 2
- Disclaimer 2
- Technical support contact information 2
- Trademarks 2
- V2406 2422 2426 linux user s manual 2
- Www moxa com support 2
- Table of contents 3
- Introduction 5
- Attention 6
- Device driver 6
- Hardware 6
- Linux kernel 6
- Micro kernel 6
- Overview 6
- Protocol stack 6
- Software specifications 6
- Software components 7
- V2406 2422 2426 linux user s manual introduction 7
- Software configuration 8
- Display on single or multiple outputs 9
- Moxa login root password last login mon jan 22 19 02 16 2007 from 192 68 20 for further information check 9
- Moxa mount o remount rw 9
- Moxa umount 9
- Section device identifier intel corporation mobile 945gm gms 943 940gml express integrated graphics controller 9
- Starting from a vga console 9
- The read only file system 9
- V2406 2422 2426 linux user s manual software configuration 9
- Etc init d gdm star 12
- Moxa etc init d gdm start 12
- Moxa mv etc rc2 d n30gdm etc rc2 d s30gdm 12
- Startup with desktop environment 12
- V2406 2422 2426 linux user s manual software configuration 12
- Connecting from a telnet console 13
- Connecting from an ssh console 13
- V2406 2422 2426 linux user s manual software configuration 13
- Adjusting the system time 14
- Linux users 14
- Root bee_notebook root ssh 192 68 27 the authenticity of host 192 68 27 192 68 27 can t be established rsa key fingerprint is 8b ee ff 84 41 25 fc cd 2a f2 92 8f cb 1f 6b 2f are you sure you want to continue connection yes no yes_ 14
- Setting the time manually 14
- V2406 2422 2426 linux user s manual software configuration 14
- Windows users 14
- Attention 15
- Moxa date hwclock wed dec 16 16 36 12 cst 2009 wed 16 dec 2009 03 38 13 am cst 0 16751 seconds moxa moxa ntpdate time stdtime gov tw 16 dec 03 49 48 ntpdate2510 step time server 220 30 58 2 offset 155905087 84256 sec moxa moxa hwclock w moxa date hwclock wed dec 16 03 51 07 cst 2009 wed 16 dec 2009 03 51 07 am cst 0 16771 seconds moxa 15
- Ntp client 15
- V2406 2422 2426 linux user s manual software configuration 15
- Enabling and disabling daemons 16
- Example shell script for updating the system time periodically 16
- How to run the shell script automatically when the kernel boots up 16
- Updating the time automatically 16
- Setting the run level 18
- Cd etc rc2 d ln s etc root tcps2 s60tcps2 19
- Cron daemon for executing scheduled commands 19
- Ln s etc root tcps2 k30tcps2 19
- Moxa cd etc rc2 d moxa etc rc2 d moxa etc rc2 d ls s19nfs common s25nfs user server s99showreadyled 19
- Moxa etc rc2 d moxa etc rc2 d ln s root tcps2 release s60tcps2 moxa etc rc2 d ls s19nfs common s25nfs user server s99rmnologin 19
- Moxa rm f etc rc2 d s60tcps2 19
- Moxa umount 19
- S20snmpd s55ssh 19
- S20snmpd s55ssh s99showreadyled 19
- S24pcmcia s60tcps2 19
- S24pcmcia s99rmnologin 19
- Umount 19
- V2406 2422 2426 linux user s manual software configuration 19
- Inserting a usb storage device into the computer 20
- Apt installing and removing packages 21
- Attention 21
- Cf automount for v242x kernel sd 1 9 kernels 1 0 1 0 run bin mount dev k media cf n 21
- Checking the linux version 21
- Inserting a compact flash card 21
- Moxa mount o remount rw 21
- Moxa uname a linux moxa 2 0 bpo 686 1 smp fri dec 11 18 12 58 utc 2009 i686 gnu linux moxa 21
- Moxa vi etc apt sources list 21
- V2406 2422 2426 linux user s manual software configuration 21
- Attention 22
- Attention 23
- Bin sh case 1 in hibernate suspend echo close ap and tty ports which are opened 23
- Device suspend 23
- Echo operations after serial ports resume exit na esac 23
- Echo operations before serial ports suspend thaw resume echo restart ap 23
- Moxa apt get clean moxa 23
- Moxa pm suspend quirk s3 bios 23
- None 501m 19m 482m 4 tmp dev sda2 270m 130m 126m 51 home moxa 23
- V2406 2422 2426 linux user s manual software configuration 23
- Etherwake b 00 90 e8 00 d7 07 24
- Moxa ethtool eth0 settings for eth0 supported ports tp supported link modes 10baset half 10baset full 100baset half 100baset full 1000baset full supports auto negotiation yes advertised link modes 10baset half 10baset full 100baset half 100baset full 1000baset full advertised auto negotiation yes speed 100mb s duplex full port twisted pair phyad 0 transceiver internal auto negotiation on supports wake on pumbg wake on ug current message level 0x00000033 51 link detected yes moxa 24
- V2406 2422 2426 linux user s manual software configuration 24
- Wake on lan 24
- Managing communications 25
- Attention 26
- Changing the interfaces configuration file 26
- Changing the network settings 26
- Detecting network interfaces 26
- Adjusting ip addresses with ifconfig 27
- Dynamic ip address using dhcp 27
- Moxa etc init d networking restart 27
- Moxa ifconfig eth0 192 68 moxa 27
- Serial port operation mode 27
- Static ip address 27
- The loopback network interface auto lo iface lo inet loopback the primary network interface auto eth0 iface eth0 inet static address 192 68 27 netmask 255 55 55 broadcast 192 68 55 auto eth1 iface eth1 inet static address 192 68 27 netmask 255 55 55 broadcast 192 68 55 27
- The primary network interface allow hotplug eth0 iface eth0 inet dhcp 27
- V2406 2422 2426 linux user s manual managing communications 27
- Enabling the telnet ftp server 28
- Telnet ftp server 28
- Disabling the telnet ftp server 29
- Discard dgram udp wait root bin discard discard stream tcp nowait root bin discard telnet stream tcp nowait root bin telnetd ftp stream tcp nowait root bin ftpd l 29
- Dns client 29
- Etc hostname 29
- Etc resolv conf 29
- Moxa etc init d hostname sh start 29
- Moxa hostname 29
- Moxa mount o remount rw dev hda1 29
- Moxa umount 29
- Moxa vi etc hostname moxa 29
- V2406 2422 2426 linux user s manual managing communications 29
- Apache web server 30
- Default homepage 30
- Etc nsswitch conf 30
- Attention 31
- Disabling the cgi function 31
- Moxa etc init d apache2 restart 31
- Moxa mount o remount rw 31
- Moxa umount 31
- Saving web pages to a usb storage device 31
- V2406 2422 2426 linux user s manual managing communications 31
- Vi etc apache2 sites enabled 000 defaul 31
- Attention 33
- Filter table includes three chains 33
- Iptables 33
- Mangle table includes two chains 33
- Moxa etc init d apache2 restart 33
- Moxa umount 33
- Nat table includes three chains 33
- Sub tables 33
- V2406 2422 2426 linux user s manual managing communications 33
- Iptables hierarchy 34
- Iptables modules 34
- V2406 2422 2426 linux user s manual managing communications 34
- Attention 35
- Define policy for chain rules 35
- Example 35
- Lsmod modprobe ip_tables modprobe iptable_filter modprobe iptable_mangle modprobe iptable_nat 35
- Observe and erase chain rules 35
- V2406 2422 2426 linux user s manual managing communications 35
- Append or delete rules 36
- Example 36
- Examples 36
- V2406 2422 2426 linux user s manual managing communications 36
- Attention 37
- Enabling nat at bootup 37
- Nat example 37
- Nat network address translation 37
- Attention 38
- Connecting to a ppp server over a simple dial up connection 38
- Ppp point to point protocol 38
- Connecting to a ppp server over a hard wired link 39
- Pppd connect chat v atdt5551212 connect user username password password dev ttys0 115200 crtscts modem 39
- Pppd connect chat v noipdefault dev tty 19200 crtscts 39
- Pppd connect chat v user root password root noipdefault dev ttys0 19200 crtscts 39
- V2406 2422 2426 linux user s manual managing communications 39
- Checking the connection 40
- Method 1 pppd dial in with pppd commands 41
- Method 2 pppd dial in with pppd script 41
- Setting up a machine for incoming ppp connections 41
- Attention 42
- Attention the definitions here can allow users to login without a password if you don t use the login option of pppd the mgetty debian package already provides this option make sure you don t change that inbound connections every regular user can use ppp and has to use passwords from etc passwd hostname 42
- Etc inittab moxa umount 42
- Plugin rp pppoe 42
- Received note it is not advisable to use this option with the persist 42
- Secrets for authentication using chap client server secret ip addresses pppoe example if you want to use it you need to unmark it and modify it 42
- Username hinet net password 42
- Username hinet net password userids that cannot use ppp at all check your etc passwd and add any other accounts that should not be able to use pppd guest hostname master hostname root hostname support hostname stats hostname outbound connections 42
- V2406 2422 2426 linux user s manual managing communications 42
- Attention 44
- Inet addr 192 6 2 p t p 129 7 65 mask 255 55 55 inet addr 192 6 2 p t p 129 7 65 mask 255 55 55 44
- Mkdir p home nfs public 44
- Mount t nfs o nolock 192 68 00 home public home nfs public 44
- Nfs network file system client 44
- Ppp0 link encap point to point protocol 44
- Rx packets 33 errors 0 dropped 0 overrun 0 rx packets 33 errors 0 dropped 0 overrun 0 44
- Showmount e host 44
- Snmp query started root jaredrh90 root snmpwalk v 1 c public 192 68 0 28 more rfc1213 mib sysdescr string linux moxa 2 0 bpo 686 1 smp fri dec 11 18 12 58 utc 2009 i686 rfc1213 mib sysobjectid oid rfc1155 smi enterprises 691 2 420 disman event mib sysuptimeinstance timeticks 126176 0 21 01 6 44
- Snmp simple network management protocol 44
- Tx packets 42 errors 0 dropped 0 overrun 0 tx packets 42 errors 0 dropped 0 overrun 0 44
- Up pointopoint running mtu 1500 metric 1 up pointopoint running mtu 1500 metric 1 44
- V2406 2422 2426 linux user s manual managing communications 44
- Attention 45
- Ethernet bridging for private networks on different subnets 45
- Openvpn 45
- Attention 46
- Attention 47
- 68 0 0 255 55 55 u 0 0 0 eth3 48
- 68 0 255 55 55 u 0 0 0 br0 48
- 68 0 255 55 55 u 0 0 0 eth0 48
- 68 0 255 55 55 u 0 0 0 eth2 48
- Attention 48
- Destination gateway genmsk flags metric ref use iface 48
- Ethernet bridging for private networks on the same subnet 48
- Killall term openvpn 48
- Ln sf etc init d openvpn etc rc0 d k80openvpn ln sf etc init d openvpn etc rc6 d k80openvpn 48
- Ln sf etc init d openvpn etc rc2 d s16openvpn 48
- Ping 192 68 74 48
- Route add net 192 68 netmask 255 55 55 dev eth0 48
- V2406 2422 2426 linux user s manual managing communications 48
- Point to the peer remote 192 68 74 dev tap0 secret etc openvpn secrouter key cipher des ede3 cbc auth md5 tun mtu 1500 tun mtu extra 64 ping 40 up etc openvpn tap0 br sh comp lzo 49
- Point to the peer remote 192 68 74 dev tun secret etc openvpn secrouter key cipher des ede3 cbc auth md5 tun mtu 1500 tun mtu extra 64 ping 40 ifconfig 192 68 73 192 68 74 up etc openvpn tun sh 49
- Routed ip 49
- V2406 2422 2426 linux user s manual managing communications 49
- Programming guide 51
- Define rs232_mode 0 define rs485_2wire_mode 1 define rs422_mode 2 define rs485_4wire_mode 3 52
- Device api 52
- Man ioctl 52
- Rtc real time clock 52
- V2406 2422 2426 linux user s manual programming guide 52
- Baudrate inaccuracy 53
- Example to get the baudrate 53
- Example to set the baudrate 53
- Special note 53
- Struct termios term int fd speed fd open dev ttys0 o_rdwr tcgetattr fd term if term c_cflag cbaud cbaudex b4000000 follow the standard termios baud rate define else ioctl fd moxa_get_special_baud_rate speed 53
- Struct termios term int fd speed fd open dev ttys0 o_rdwr tcgetattr fd term term c_cflag cbaud cbaudex term c_cflag b4000000 tcsetattr fd tcsanow term speed 500000 ioctl fd moxa_set_special_baud_rate speed 53
- V2406 2422 2426 linux user s manual programming guide 53
- Define dio_error_port 1 no such port define dio_error_mode 2 no such mode or state define dio_error_control 3 open or ioctl fail define dio_error_duration 4 the value of duration is not 0 or not in the range 40 duration 3600000 milliseconds 1 hour define dio_error_duration_20ms 5 the value of duration must be a multiple of 20 ms define dio_ok 0 54
- Define dio_high 1 define dio_low 0 54
- Digital i o 54
- V2406 2422 2426 linux user s manual programming guide 54
- Examples 55
- Special note 55
- V2406 2422 2426 linux user s manual programming guide 55
- How the wdt works 56
- Introduction 56
- The user api 56
- V2406 2422 2426 linux user s manual programming guide 56
- Wdt watch dog timer 56
- Examples 57
- Special note 57
- V2406 2422 2426 linux user s manual programming guide 57
- System recovery 58
- Attention 59
- Recovery environment 59
- Recovery procedure 59
- Usb port 59
- V2406 2422 24 26 lx 59
- V2406 2422 2426 linux user s manual system recovery 59
- V2406 2422 2426 linux user s manual system recovery 60
- Attention 61
- V2406 2422 2426 linux user s manual system recovery 61
- V2406 2422 2426 linux user s manual system recovery 62
- V2406 2422 2426 linux user s manual system recovery 63
- V2406 2422 2426 linux user s manual system recovery 64
- Attention 65
- V2406 2422 2426 linux user s manual system recovery 65
- A software components 66
- Software components 66
- V2406 2422 2426 linux user s manual software components 67
- V2406 2422 2426 linux user s manual software components 68
- V2406 2422 2426 linux user s manual software components 69
- V2406 2422 2426 linux user s manual software components 70
- V2406 2422 2426 linux user s manual software components 71
- V2406 2422 2426 linux user s manual software components 72
- V2406 2422 2426 linux user s manual software components 73
- V2406 2422 2426 linux user s manual software components 74
- V2406 2422 2426 linux user s manual software components 75
- V2406 2422 2426 linux user s manual software components 76
- V2406 2422 2426 linux user s manual software components 77
- V2406 2422 2426 linux user s manual software components 78
- V2406 2422 2426 linux user s manual software components 79
- V2406 2422 2426 linux user s manual software components 80
- V2406 2422 2426 linux user s manual software components 81
Похожие устройства
- Moxa V2406-T-LX Руководство по быстрой установке
- Moxa V2406-XPE Инструкция по эксплуатации
- Moxa V2406-XPE Руководство по аппаратной части
- Moxa V2406-XPE Технические характеристики
- Moxa V2406-XPE Руководство по быстрой установке
- Moxa V2406-XPE Руководство по программной части (Linux)
- Moxa V2406-T-XPE Инструкция по эксплуатации
- Moxa V2406-T-XPE Руководство по аппаратной части
- Moxa V2406-T-XPE Технические характеристики
- Moxa V2406-T-XPE Руководство по программной части (Linux)
- Moxa V2406-T-XPE Руководство по быстрой установке
- Moxa V2406-W7E Инструкция по эксплуатации
- Moxa V2406-W7E Руководство по аппаратной части
- Moxa V2406-W7E Технические характеристики
- Moxa V2406-W7E Руководство по программной части (Linux)
- Moxa V2406-W7E Руководство по быстрой установке
- Moxa V2406-T-W7E Инструкция по эксплуатации
- Moxa V2406-T-W7E Руководство по аппаратной части
- Moxa V2406-T-W7E Технические характеристики
- Moxa V2406-T-W7E Руководство по программной части (Linux)