How to find web server type running on a Linux or windows machine? Is there any Linux command to get the details?
Ans :
Yes its possible in Linux by using curl(client for URL) command. To find which web server is running on a machine use blow command.

#curl -I www.linuxnix.com
# curl -I itig

HTTP/1.1 200 OK
Via: 1.1 us-PROXY1, 1.1 us-PROXY2
Connection: close
Proxy-Connection: close
Expires: Mon, 1 Jan 2001 00:00:00 GMT
Date: Mon, 14 Jun 2010 03:26:55 GMT
Content-Type: text/html; charset=utf-8
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.1.6
Set-Cookie: b2933756b1f0288a74dd630e51954bff=5sl7jaqpgliambi2fq7q3ailv6; path=/
P3P: CP=”NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM”
Last-Modified: Mon, 14 Jun 2010 03:26:55 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

In the above out put we can see server as Apache 2.2.3.

cURL is an excellent tool to do many thing such as

1. File transfers(FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3 and RTSP)
2. Can understand SSL certificates
3. Can understand Proxies
4. Can understand Cookies
5. User+password authentication (Basic, Digest, NTLM, Negotiate, kerberos…)
6. File transfer resume
7. Proxy tunneling etc..