Use xinetd knowledge in ubuntu [Knowledge Point] standard http response file content HTTP/1.1200 OKServer: Apache-Coyote/1.1Content-Length: 0 Date: Wed, 27Feb201302: 34: 36GMTwww. 2cto. install comubuntu (system-level tool, 1... use xinetd knowledge in ubuntu [Knowledge Point] standard http response file Content HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Length: 0 Date: Wed, 27 Feb 2013 02:34:36 GMT www.2cto.com ubuntu installation (system-level tool, generally not customized installation) apt-get install xinetd [create a service script]/root/shell/httpok. sh #! /Bin/sh/bin/echo-e "HTTP/1.1 200 OK \ r \ n"/bin/echo-e "Content-Type: text/plain \ r \ n "/bin/echo-e" \ r \ n "/bin/echo-e" hello xinetd \ r \ n "/bin/echo-e "\ r \ n": modify the script permission (grant the user executable permission) chmod 755/etc/xinetd. d/httpok [create xinetd service] vi/etc/xinetd. d/httpok service my_httpok {flags = REUSE socket_type = stream # port = 9201 wait = no user = root server =/root/shell/httpok. sh # log_on_failure + = USERID disable = no # only_from = 192.168.5.0/24 # recommended to put the IPs that need to connect exclusively (security purposes)} www.2cto.com [Modify the port, there are two methods: 1. the default dependency is/etc/services. in this case,/etc/xinetd. the port configured in the d/httpok file is invalid, so you do not need to configure vi/etc/services my_httpok 9201/tcp 2. remove dependency/etc/services at this time/etc/xinetd. d/httpok file configuration requires adding type = UNLISTED port = 9201 [restart the service, test port access] service xinetd restart curl http://127.0.0.1:9201/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service