{"id":11372,"date":"2021-12-15T05:57:22","date_gmt":"2021-12-15T10:57:22","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=11372"},"modified":"2021-12-15T05:57:23","modified_gmt":"2021-12-15T10:57:23","slug":"check-apache-version-ubuntu-using-command-line","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/check-apache-version-ubuntu-using-command-line\/","title":{"rendered":"How to Check Apache Version on Ubuntu 20.04 Using Command Line"},"content":{"rendered":"\n
With a web server software as old as Apache<\/a>, there tend to be situations where your installation falls behind current versions if not maintained properly. That is why you need to know how to check Apache version on Ubuntu.<\/p>\n\n\n\n Apache, free and open-source software is the most popular web server today. It was initially released in April 1995. The current stable release as of posting this article is Apache 2.4.51<\/a>.<\/p>\n\n\n\n Written in C, it is a cross-platform web<\/a> server and supports the major operating systems Linux, macOS, and Windows among a host of others.<\/p>\n\n\n\n You should use the apache2 -v command-line option (in lower case) to check the current Apache version on Ubuntu<\/a>. This command also works on other Debian<\/a>-based Linux<\/a> systems.<\/p>\n\n\n\n With the following as output.<\/p>\n\n\n\n This is not to be confused with the This is an example of the partial output.<\/p>\n\n\n\n You can check other Apache command-line options using this.<\/p>\n\n\n\n Which will give you the following output.<\/p>\n\n\n\n For users on the CentOS, Fedora, and RHEL-based Linux systems, we have a related guide<\/a> showing you how you can do the above on those systems.<\/p>\n\n\n\nCheck Apache Version Using This<\/h2>\n\n\n\n
$ apache2 -v<\/code><\/pre>\n\n\n\n
Server version: Apache\/2.4.51 (Ubuntu)\nServer built: 2021-10-07T19:17:14<\/code><\/pre>\n\n\n\n
-V<\/code> option, that is
-V<\/code> in upper case. The caps option is used to show compile settings and includes the version number too. You can check the output by running this command.<\/p>\n\n\n\n
$ apache2 -V<\/code><\/pre>\n\n\n\n
...\n\nServer built: 2021-10-07T19:17:14\nServer's Module Magic Number: 20120211:118\nServer loaded: APR 1.7.0, APR-UTIL 1.6.1\nCompiled using: APR 1.7.0, APR-UTIL 1.6.1\nArchitecture: 64-bit\nServer MPM: event\nthreaded: yes (fixed thread count)\nforked: yes (variable process count)\nServer compiled with\u2026.\n\n...<\/code><\/pre>\n\n\n\n
$ apache2 -h<\/code><\/pre>\n\n\n\n
Usage: apache2 [-D name] [-d directory] [-f file]\n [-C "directive"] [-c "directive"]\n [-k start|restart|graceful|graceful-stop|stop]\n [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]\nOptions:\n -D name : define a name for use in <IfDefine name> directives\n -d directory : specify an alternate initial ServerRoot\n -f file : specify an alternate ServerConfigFile\n -C "directive" : process directive before reading config files\n -c "directive" : process directive after reading config files\n -e level : show startup errors of level (see LogLevel)\n -E file : log startup errors to file\n -v : show version number\n -V : show compile settings\n -h : list available command line options (this page)\n -l : list compiled in modules\n -L : list available configuration directives\n -t -D DUMP_VHOSTS : show parsed vhost settings\n -t -D DUMP_RUN_CFG : show parsed run settings\n -S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG\n -t -D DUMP_MODULES : show all loaded modules\n -M : a synonym for -t -D DUMP_MODULES\n -t -D DUMP_INCLUDES: show all included configuration files\n -t : run syntax check for config files\n -T : start without DocumentRoot(s) check\n -X : debug mode (only one worker, do not detach)<\/code><\/pre>\n\n\n\n
Conclusion<\/h2>\n\n\n\n