Friday 06 May 2011 9:45:56 am - 5 replies

» Read full tutorial

Introduction

After completing this tutorial, you should have a working eZ Publish 4.2011 Community (or 4.5) installation running on a single Debian 6 server with the following features:

  • Nginx 1.0.0+ as web server
  • PHP 5.3.6+ invoked through PHP-FPM (FastCGI Process Manager)
  • APC (Alternative PHP Cache)
  • Rewrites for friendly URLs (virtual host mode)
  • Proper http cache headers for static files
  • Gzip compression
 
Author Message

Quoc Huy Nguyen Dinh

Monday 09 May 2011 3:24:36 am

Great tutorial! Well done and thanks for sharing to the community.

I've been using Nginx for some times now but as a proxying server. I've basically configure it to proxy cache all binary files and optionally forward the requests to dynamic content to another server running with Apache. Then using a modified all2evcc extension I can clear the cache on publishing by calling the purge URL handled by NGX Cache Purge plugin.

Gaetano Giunta

Monday 09 May 2011 3:58:58 am

For purging cache of reverse proxies upon content publishing, ezflow and ezworkflowcollection extensions can do it too (only drawback: only for current node url, no smart view cache mgmt)

Principal Consultant International Business
Member of the Community Project Board

Daniel A. Øien

Saturday 04 June 2011 5:08:22 am

Update: with the recent Dotdeb packages, the tutorial should work exactly the same on a Debian 5 "Lenny" server, with the following exception:

in /etc/apt/sources.list, add

deb http://packages.dotdeb.org oldstable all
deb-src http://packages.dotdeb.org oldstable all

instead of 

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

Sander van den Akker

Saturday 11 June 2011 2:03:43 pm

Thanks for sharing this! I'm seriously considering ditching Apache from my development environment and replacing it with Nginx.

I still have one small problem. Your set of rewrite rules works like a charm but index.php is still in the url string. This used to work in Apache (even with the rewrite rules in .htaccess, although I needed the ForceVirtualHost=true ini setting).

Anyone got a solution to this?

Edit: I had a misconfiguration in the MatchOrder. Don't know how this reflected on the above problem, but solved!

eZ Publish certified developer
http://auth.ez.no/certification/verify/392313

Daniel A. Øien

Friday 19 August 2011 1:32:00 am

Another detail that you might find useful: to control upload filesizes, there are three settings that you need to configure, one of which is particular to Nginx.

In the server block of your nginx sites (usually in /etc/nginx/sites-available/mysite, or in /etc/nginx/nginx.conf if you're not using sites)  you need to add (examples using 50 MB):

client_max_body_size 51m;   

Where XX is the desired maximum post size. This needs to be slightly higher than upload_max_filesize (see below).

You should also set in php.ini (/etc/php5/fpm/php.ini):

upload_max_filesize = 50M

post_max_size = 51M

The last one needs to be higher than upload_max_filesize as it takes into account other POST data in addition to the actual file.

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

You must be logged in to post messages in this topic!

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 17 2025 21:04:36
Script start
Timing: Jan 17 2025 21:04:36
Module start 'layout'
Timing: Jan 17 2025 21:04:36
Module start 'content'
Timing: Jan 17 2025 21:04:36
Module end 'content'
Timing: Jan 17 2025 21:04:36
Script end

Main resources:

Total runtime0.1445 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 597.8594152.1875
Module start 'layout' 0.00470.0030 750.046939.5547
Module start 'content' 0.00770.1356 789.6016867.1875
Module end 'content' 0.14330.0012 1,656.789122.4766
Script end 0.1445  1,679.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00302.1009160.0002
Check MTime0.00130.8648160.0001
Mysql Total
Database connection0.00060.402610.0006
Mysqli_queries0.075252.0070800.0009
Looping result0.00050.3645780.0000
Template Total0.121083.720.0605
Template load0.00161.084920.0008
Template processing0.119482.635120.0597
Template load and register function0.00020.113510.0002
states
state_id_array0.00090.646920.0005
state_identifier_array0.00090.619930.0003
Override
Cache load0.00140.9786450.0000
Sytem overhead
Fetch class attribute name0.00100.6713100.0001
Fetch class attribute can translate value0.00040.300240.0001
class_abstraction
Instantiating content class attribute0.00000.0125110.0000
XML
Image XML parsing0.00211.423240.0005
General
dbfile0.00120.8533370.0000
String conversion0.00000.005140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplforum_topic/full.tplextension/community_design/design/suncana/override/templates/forum_topic/full.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1content/datatype/view/ezxmltags/separator.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltags/separator.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs