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.

Have a Unix Problem
Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.