In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Set up Apache to execute CGI program
Visit http://192.168.10.10/cgi-bin/test
You are accessing the cgi program in a different directory.
When this is set, any file in the cgi-bin directory runs as a CGI program.
Set the files in the cgi-bin directory to be executed with CGI.
You can execute the CGI program in a file in a directory other than cgi-bin. Add the ExecCGI option after options.
Set the file with the corresponding suffix to be executed as a CGI program
When this is set up, .cgi, .sh (shell), .pl (perl) files in other directories will be executed as CGI programs, not as text files.
Http://10.10.103.14:8088/CGI/test.sh
Example:
Shell script:
Test.sh
[c-sharp] view plaincopy
#! / bin/sh
# disable filename globbing
Set-f
Echo "Content-type: text/plain; charset=iso-8859-1"
Echo # there must be a blank line output here, as specified by all CGI programs
Echo CGI/1.0 test script report:
Echo
Echo argc is $#. Argv is "$*".
Echo
Echo SERVER_SOFTWARE = $SERVER_SOFTWARE
Echo SERVER_NAME = $SERVER_NAME
Echo GATEWAY_INTERFACE = $GATEWAY_INTERFACE
Echo SERVER_PROTOCOL = $SERVER_PROTOCOL
Echo SERVER_PORT = $SERVER_PORT
Echo REQUEST_METHOD = $REQUEST_METHOD
Echo HTTP_ACCEPT = "$HTTP_ACCEPT"
Echo PATH_INFO = "$PATH_INFO"
Echo PATH_TRANSLATED = "$PATH_TRANSLATED"
Echo SCRIPT_NAME = "$SCRIPT_NAME"
Echo QUERY_STRING = "$QUERY_STRING"
Echo REMOTE_HOST = $REMOTE_HOST
Echo REMOTE_ADDR = $REMOTE_ADDR
Echo REMOTE_USER = $REMOTE_USER
Echo AUTH_TYPE = $AUTH_TYPE
Echo CONTENT_TYPE = $CONTENT_TYPE
Echo CONTENT_LENGTH = $CONTENT_LENGTH
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.