This is lifted from http://bashcurescancer.com/shell-function-which-webserver-does-that-site-run.html.

Handy shell function you can put in your .bashrc. Quickly find out what server a host is running.

what-http-server() { curl -s -I $(for h in "$@"; do printf "http://%s " "$h"; done) | awk -F': ' '/^Server:/ {print $2}'; }

Now try what-http-server kernel.org google.com hotmail.com.