UNIX Programming, Certification, System Administration, Performance Tuning Reference Books
Check if the web server is running without a browser

Suppose we want to check whether the web server is running or not, but we don't have any browsers ( lynx, IE, Netscape ...), then there is a simple way of doing that. Just telnet to that machine on the http port ( port no 80 in general).

% telnet <ip addr> <port no>

And then, say "get /" (without quotes). If the webserver is running, it displays the HTML script of the homepage or basic info and closes the connection to the remote host.

% telnet yahoo.com 80

Trying 204.71.200.245...

Connected to yahoo.com.

Escape character is '^]'.

get /

HTTP/1.0 302 RD

Location: http://www.yahoo.com/

Connection closed by foreign host.
 

Return to : Unix System Administration Hints and Tips