The tiniest Apache setup for installing eZ Publish

Monday 04 July 2011 2:17:27 pm

By : Gaetano Giunta

Apache is a highly modular software - and that's a great feature, that contrbuted a lot to its wild success! Some linux distributions however have a default installation of Apache with many, many modules enabled. maybe too much. We know that any unused module chews up valuable ram, is a possible target of attack for crackers and slows down the startup of the webserver by a few milliseconds.

So, what is the absolute minimum list of Apache modules that are needed to successfully run eZ Publish? Read on to find out...

With a little experimenting, here is the list I came up with:

 List of needed modules:

  •  mod_php: required
  •  mod_mime: required for the AddType directive used to map php scripts to mod_php engine
  •  mod_authz_host ("order allow/deny" directive to block access to the complete filesystem of the server)

in vhost mode:

  •  mod_rewrite

in non-vhost mode:

  •  mod_dir

Note: mod_dir can not be disabled with the standard eZ Publish .htaccess file that contains a DirectoryIndex directive. That directive is unnecessary when rewrite rules are active and it can be safely removed.

Now, that's a small list, isn't it? On my windows 7 laptop, Apache uses about 5 MB of ram when started up in this minimal setup.

List of recommended modules:

  • mod_log_config (custom log files / formats)
  • mod_expires: recommended to add expiry headers on static resources (lighter load on the server, faster page load time for end users)
  • mod_deflate: recommended to compress css, js etc... + mod_setenvif + mod_headers to make it work properly (faster page load time for end users on slow connections)
  • mod_ssl:  recommended for security (needs to be properly configured to be of use, both in httpd.conf and eZP site.ini)
  • mod_info recommended for monitoring Apache status (in conjunction with external tools such as munin, mrtg or nagios)

All other modules:

enable on an as-needed basis

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:51:25
Script start
Timing: Jan 29 2025 23:51:25
Module start 'layout'
Timing: Jan 29 2025 23:51:25
Module start 'content'
Timing: Jan 29 2025 23:51:25
Module end 'content'
Timing: Jan 29 2025 23:51:25
Script end

Main resources:

Total runtime0.0132 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 588.3750151.2422
Module start 'layout' 0.00420.0033 739.617236.7031
Module start 'content' 0.00760.0046 776.320395.2578
Module end 'content' 0.01210.0011 871.578129.9766
Script end 0.0132  901.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002115.5142140.0001
Check MTime0.00107.3485140.0001
Mysql Total
Database connection0.00064.763410.0006
Mysqli_queries0.003224.448730.0011
Looping result0.00000.113410.0000
Template Total0.00086.210.0008
Template load0.00064.749010.0006
Template processing0.00021.373610.0002
Override
Cache load0.00043.285410.0004
General
dbfile0.00096.738280.0001
String conversion0.00000.028840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs