{"id":11715,"date":"2019-03-15T23:30:51","date_gmt":"2019-03-15T23:30:51","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11715"},"modified":"2019-03-15T23:30:51","modified_gmt":"2019-03-15T23:30:51","slug":"how-to-check-which-apache-modules-are-enabled-loaded-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/15\/how-to-check-which-apache-modules-are-enabled-loaded-in-linux\/","title":{"rendered":"How to Check Which Apache Modules are Enabled\/Loaded in Linux"},"content":{"rendered":"<p>In this guide, we will briefly talk about the Apache web server front-end and how to list or check which Apache modules have been enabled on your server.<\/p>\n<p><strong>Apache<\/strong>\u00a0is built, based on the principle of modularity, this way, it enables web server administrators to add different modules to extend its primary functionalities and\u00a0<a href=\"https:\/\/www.tecmint.com\/apache-performance-tuning\/\" target=\"_blank\" rel=\"noopener\">enhance apache performance<\/a>\u00a0as well.<\/p>\n<p><b>Suggested Read:<\/b>\u00a0<a href=\"https:\/\/www.tecmint.com\/apache-performance-tuning\/\" target=\"_blank\" rel=\"noopener\">5 Tips to Boost the Performance of Your Apache Web Server<\/a><\/p>\n<p>Some of the common Apache modules include:<\/p>\n<ol>\n<li><strong>mod_ssl<\/strong>\u00a0\u2013 which offers\u00a0<a href=\"https:\/\/www.tecmint.com\/install-lets-encrypt-ssl-certificate-to-secure-apache-on-rhel-centos\/\" target=\"_blank\" rel=\"noopener\">HTTPS for Apache<\/a>.<\/li>\n<li><strong>mod_rewrite<\/strong>\u00a0\u2013 which allows for matching url patterns with regular expressions, and perform a transparent redirect using\u00a0<a href=\"https:\/\/www.tecmint.com\/apache-htaccess-tricks\/\" target=\"_blank\" rel=\"noopener\">.htaccess tricks<\/a>, or apply a HTTP status code response.<\/li>\n<li><strong>mod_security<\/strong>\u00a0\u2013 which offers you to\u00a0<a href=\"https:\/\/www.tecmint.com\/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora\/\" target=\"_blank\" rel=\"noopener\">protect Apache against Brute Force or DDoS attacks<\/a>.<\/li>\n<li><strong>mod_status<\/strong>\u00a0\u2013 that allows you to\u00a0<a href=\"https:\/\/www.tecmint.com\/monitor-apache-web-server-load-and-page-statistics\/\" target=\"_blank\" rel=\"noopener\">monitor Apache web server load and page statics<\/a>.<\/li>\n<\/ol>\n<p>In Linux, the\u00a0<strong>apachectl<\/strong>\u00a0or\u00a0<strong>apache2ctl<\/strong>\u00a0command is used to control Apache HTTP server interface, it is a front-end to Apache.<\/p>\n<p>You can display the usage information for\u00a0<strong>apache2ctl<\/strong>\u00a0as below:<\/p>\n<pre>$ apache2ctl help\r\nOR\r\n$ apachectl help\r\n<\/pre>\n<div class=\"code-label\">apachectl help<\/div>\n<pre>Usage: \/usr\/sbin\/httpd [-D name] [-d directory] [-f file]\r\n                       [-C \"directive\"] [-c \"directive\"]\r\n                       [-k start|restart|graceful|graceful-stop|stop]\r\n                       [-v] [-V] [-h] [-l] [-L] [-t] [-S]\r\nOptions:\r\n  -D name            : define a name for use in  directives\r\n  -d directory       : specify an alternate initial ServerRoot\r\n  -f file            : specify an alternate ServerConfigFile\r\n  -C \"directive\"     : process directive before reading config files\r\n  -c \"directive\"     : process directive after reading config files\r\n  -e level           : show startup errors of level (see LogLevel)\r\n  -E file            : log startup errors to file\r\n  -v                 : show version number\r\n  -V                 : show compile settings\r\n  -h                 : list available command line options (this page)\r\n  -l                 : list compiled in modules\r\n  -L                 : list available configuration directives\r\n  -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)\r\n  -S                 : a synonym for -t -D DUMP_VHOSTS\r\n  -t -D DUMP_MODULES : show all loaded modules \r\n  -M                 : a synonym for -t -D DUMP_MODULES\r\n  -t                 : run syntax check for config files\r\n<\/pre>\n<p><strong>apache2ctl<\/strong>\u00a0can function in two possible modes, a\u00a0<strong>Sys V init<\/strong>\u00a0mode and\u00a0<strong>pass-through<\/strong>\u00a0mode. In the\u00a0<strong>SysV init<\/strong>mode,\u00a0<strong>apache2ctl<\/strong>\u00a0takes simple, one-word commands in the form below:<\/p>\n<pre>$ apachectl command\r\nOR\r\n$ apache2ctl command\r\n<\/pre>\n<p>For instance, to start\u00a0<strong>Apache<\/strong>\u00a0and check its status, run these two commands with root user privileges by employing the\u00a0<a href=\"https:\/\/www.tecmint.com\/su-vs-sudo-and-how-to-configure-sudo-in-linux\/\" target=\"_blank\" rel=\"noopener\">sudo command<\/a>, in case you are a normal user:<\/p>\n<pre>$ sudo apache2ctl start\r\n$ sudo apache2ctl status\r\n<\/pre>\n<div class=\"code-label\">Check Apache Status<\/div>\n<pre><strong>tecmint@TecMint ~ $ sudo apache2ctl start<\/strong>\r\nAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message\r\nhttpd (pid 1456) already running\r\n<strong>tecmint@TecMint ~ $ sudo apache2ctl status<\/strong>\r\nApache Server Status for localhost (via 127.0.0.1)\r\n\r\nServer Version: Apache\/2.4.18 (Ubuntu)\r\nServer MPM: prefork\r\nServer Built: 2016-07-14T12:32:26\r\n\r\n-------------------------------------------------------------------------------\r\n\r\nCurrent Time: Tuesday, 15-Nov-2016 11:47:28 IST\r\nRestart Time: Tuesday, 15-Nov-2016 10:21:46 IST\r\nParent Server Config. Generation: 2\r\nParent Server MPM Generation: 1\r\nServer uptime: 1 hour 25 minutes 41 seconds\r\nServer load: 0.97 0.94 0.77\r\nTotal accesses: 2 - Total Traffic: 3 kB\r\nCPU Usage: u0 s0 cu0 cs0\r\n.000389 requests\/sec - 0 B\/second - 1536 B\/request\r\n1 requests currently being processed, 4 idle workers\r\n\r\n__W__...........................................................\r\n................................................................\r\n......................\r\n\r\nScoreboard Key:\r\n\"_\" Waiting for Connection, \"S\" Starting up, \"R\" Reading Request,\r\n\"W\" Sending Reply, \"K\" Keepalive (read), \"D\" DNS Lookup,\r\n\"C\" Closing connection, \"L\" Logging, \"G\" Gracefully finishing,\r\n\"I\" Idle cleanup of worker, \".\" Open slot with no current process\r\n<\/pre>\n<p>And when operating in\u00a0<strong>pass-through<\/strong>\u00a0mode,\u00a0<strong>apache2ctl<\/strong>\u00a0can take all the Apache arguments in the following syntax:<\/p>\n<pre>$ apachectl [apache-argument]\r\n$ apache2ctl [apache-argument]\r\n<\/pre>\n<p>All the Apache-arguments can be listed as follows:<\/p>\n<pre>$ apache2 help    [On <strong>Debian<\/strong> based systems]\r\n$ httpd help      [On <strong>RHEL<\/strong> based systems]\r\n<\/pre>\n<h4>Check Enabled Apache Modules<\/h4>\n<p>Therefore, in order to check which modules are enabled on your Apache web server, run the applicable command below for your distribution, where\u00a0<code>-t -D DUMP_MODULES<\/code>\u00a0is a Apache-argument to show all enabled\/loaded modules:<\/p>\n<pre>---------------  On <strong>Debian<\/strong> based systems --------------- \r\n$ apache2ctl -t -D DUMP_MODULES   \r\nOR \r\n$ apache2ctl -M\r\n<\/pre>\n<pre>---------------  On <strong>RHEL<\/strong> based systems --------------- \r\n$ apachectl -t -D DUMP_MODULES   \r\nOR \r\n$ httpd -M\r\n$ apache2ctl -M\r\n<\/pre>\n<div class=\"code-label\">List Apache Enabled Loaded Modules<\/div>\n<pre><strong>[root@tecmint httpd]# apachectl -M<\/strong>\r\nLoaded Modules:\r\n core_module (static)\r\n mpm_prefork_module (static)\r\n http_module (static)\r\n so_module (static)\r\n auth_basic_module (shared)\r\n auth_digest_module (shared)\r\n authn_file_module (shared)\r\n authn_alias_module (shared)\r\n authn_anon_module (shared)\r\n authn_dbm_module (shared)\r\n authn_default_module (shared)\r\n authz_host_module (shared)\r\n authz_user_module (shared)\r\n authz_owner_module (shared)\r\n authz_groupfile_module (shared)\r\n authz_dbm_module (shared)\r\n authz_default_module (shared)\r\n ldap_module (shared)\r\n authnz_ldap_module (shared)\r\n include_module (shared)\r\n....\r\n<\/pre>\n<p>That\u2019s all! in this simple tutorial, we explained how to use the Apache front-end tools to list enabled\/loaded apache modules. Keep in mind that you can get in touch using the feedback form below to send us your questions or comments concerning this guide.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/check-apache-modules-enabled\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will briefly talk about the Apache web server front-end and how to list or check which Apache modules have been enabled on your server. Apache\u00a0is built, based on the principle of modularity, this way, it enables web server administrators to add different modules to extend its primary functionalities and\u00a0enhance apache performance\u00a0as &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/15\/how-to-check-which-apache-modules-are-enabled-loaded-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Check Which Apache Modules are Enabled\/Loaded in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11715","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=11715"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11715\/revisions"}],"predecessor-version":[{"id":11716,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11715\/revisions\/11716"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}