Inetd HTTP server: Difference between revisions
From VVCWiki
Jump to navigationJump to search
mNo edit summary |
(No difference)
|
Latest revision as of 19:02, 5 November 2010
In case you need a place holder or redirector for http server it's easy to implement using the following:
Add to /etc/inetd.conf (or similar)
http stream tcp nowait nobody /usr/local/bin/tiny_httpd
Now create the /usr/local/bin/tiny_httpd:
#!/usr/bin/tail -n+2 HTTP/1.1 200 OK Server: Tail_Server/1.0 (Unix) Last-Modified: Sat, 15 Dec 2007 20:00:00 GMT Connection: close Content-Type: text/html <HTML> .... whatever message is required .... </HTML>