How do I see which web server software I'm running?
I have a website running but I'm not sure which web server software is being used. How can I find out?
1 Reply
You can start by seeing which process is listening on the common web ports (80 and 443) using the command ss
and filtering the results with grep
:
ss -plunt | grep ':80\|:443'
Here's how the output of that command looks like on a Linode that is running Apache on ports 80 and 443:
[email protected]:~# ss -plunt | grep ':80\|:443'
tcp LISTEN 0 128 *:443 *:* users:(("apache2",pid=32035,fd=6),("apache2",pid=32034,fd=6),("apache2",pid=32033,fd=6),("apache2",pid=32032,fd=6),("apache2",pid=32024,fd=6),("apache2",pid=32022,fd=6),("apache2",pid=32014,fd=6),("apache2",pid=31992,fd=6),("apache2",pid=31991,fd=6),("apache2",pid=31979,fd=6),("apache2",pid=16365,fd=6))
tcp LISTEN 0 128 *:80 *:* users:(("apache2",pid=32035,fd=4),("apache2",pid=32034,fd=4),("apache2",pid=32033,fd=4),("apache2",pid=32032,fd=4),("apache2",pid=32024,fd=4),("apache2",pid=32022,fd=4),("apache2",pid=32014,fd=4),("apache2",pid=31992,fd=4),("apache2",pid=31991,fd=4),("apache2",pid=31979,fd=4),("apache2",pid=16365,fd=4))
To see which version of Apache is being used, run:
apache2 -v
Note that in some systems, Apache runs as "httpd". In that case, to find out the version you can run:
httpd -v
If the web server is Nginx, run the following command to get its version:
nginx -v