How do I see which web server software I'm running?

Linode Staff

I have a website running but I'm not sure which web server software is being used. How can I find out?

3 Replies

Linode Staff

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:

root@evaldez:~# 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

@evaldez , I think it would be great if that information was just readily available in the control panel for each Linode, like the OS, IP address etc. and other system info. It's crucial to know for most everything you do with your Linode and would be super useful to have right there, especially since the kind of web server is also not mentioned when setting up an app from the marketplace (e.g. I installed Gitea and it did not tell me which web server the default config is using).

@bennypr0fane --

Not everyone uses a Linode to run a web server…or installs marketplace apps. Besides, a Linode, all by itself, doesn't care which web server you install/use.

Alternatively, you can use this perl script to query the type of a web server from a remote machine.

— sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct