Is there any program or command that I can use to detect what webserver a website is using? With webserver I mean in software i.e. IIS 6, Apache or nginx.
You can use Netcraft What's That Site Running for a one off query.
You can use
Which will dump the server headers into a new file index.html which you can then view in a text editor.
Eg, for this site:
or for poser
only for unixoide OS!!!
For a public website, you can use Netcraft - http://netcraft.com/. It allows you to plug in a website's address, and it will analyze the headers and tell you the webserver in use.