Apache Modules

From Training Material
Jump to navigation Jump to search
title
Apache Modules
author
Sam Bashton (NobleProg Ltd)

Apache modules ⌘

  • RHEL ships with many Apache modules included
  • Almost all are enabled by default
  • This increases memory consumption of each and every Apache process

mod_dav ⌘

  • WebDav - extension for HTTP that allows users to edit and manage files on remote servers

Configuring webdav ⌘

```
<IfModule mod_dav.c>
   LimitXMLRequestBody 131072
   Alias /webdav "/home/httpd/webdav"
   <Directory /var/www/dav>
       Dav On
       Options +Indexes
       IndexOptions FancyIndexing
       AddDefaultCharset UTF-8
   </Directory>
</IfModule>
```

mod_php ⌘

  • The main reason to run Apache
  • `yum install php`

PHP Options ⌘

  • Configured via `/etc/php.ini`
  • `post_max_size` - maximum data size accepted by POST, 8MB by default
  • `upload_max_filesize` - maximum file size that can be uploaded, 2MB by default
  • `max_execution_time` - maximum time a PHP script can run
  • memory_limit - maximum amount of memory a single PHP process can use

mod_security ⌘

  • Tries to add extra security by blocking requests that look like attacks
  • Questionable how successful it is
  • Can break some applications

EPEL ⌘

Installing mod_security ⌘

  • Once EPEL has been enabled - `yum install mod_security`

Exercise ⌘

  • Enable mod_php
  • Enable mod_security