Friday 06 May 2011 6:45:56 pm - 13 replies
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:
Monday 09 May 2011 12:24:36 pm
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.
Saturday 04 June 2011 2:08:22 pm
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
Modified on Saturday 04 June 2011 2:12:37 pm by Daniel Arnrup-Øien
Saturday 11 June 2011 11: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!
Modified on Sunday 12 June 2011 4:16:14 pm by Sander van den Akker
Friday 19 August 2011 10: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.
Monday 27 February 2012 9:15:36 pm
Glad to hear it was useful, Carlos ![]()
On a side note, it seems one of the rewrite rules may be broken:
rewrite "ezjscore/call/?$" "/index_ajax.php" break;
Comment this out if you are experiencing problems such as priority changes not working in admin2. I only noticed this after upgrading to 2011.8 and at first erroneously attributed the problem to the eZ release.
I have yet to set aside a day or two to truly optimise Nginx rewrites for eZ, but I'll try to give it some tender loving care when I'm in the mood ![]()
Monday 23 April 2012 4:37:16 pm
Great tutorial, thanks!
I have to point something out. The following nginx rule is wrong:
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|swf|flv|eot|ttf|woff|svg)$ {
In my case it forces 404 errors with url endings with "ico", "eot"... (ie: http://www.domain.com/mypico)
Should be (escaping the "."
:
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|swf|flv|eot|ttf|woff|svg)$ {
Cheers
Tuesday 24 April 2012 11:09:00 am
Quote from Jose Ignacio Honrado :Should be (escaping the "."
:
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|swf|flv|eot|ttf|woff|svg)$ {Cheers
Thanks, I've updated the online version.
Wednesday 17 October 2012 5:31:06 pm
Hi everybody,
many thanks Daniel for this article, we've been taking advantage from it so many times. Everything have been working perfectly smooth.
Now we have to move to RHEL: do you, Daniel, or you guys, know if there are big differences from the way nginx + ez it's installed in Debian, vs. RHEL? suggestions? tricks?
are there other howto for RHEL as good as this one for Debian?
thanks
/francesco
Saturday 20 October 2012 11:29:20 am
Quote from Francesco Ronzon :Now we have to move to RHEL: do you, Daniel, or you guys, know if there are big differences from the way nginx + ez it's installed in Debian, vs. RHEL? suggestions? tricks?
are there other howto for RHEL as good as this one for Debian?
thanks
/francesco
I post here the results of our installation on RHEL 6, with some advice that may help others:
Installed following this howto: http://www.if-not-true-then-false.com/2011/install-nginx-php-fpm-on-fedora-centos-red-hat-rhel/
it was pretty smooth then adapting this Debian howto to REHL. Here some little differences:
* the bad is that nginx run with user "nginx", and php-fpm run with user "apache". Changing nginx user to "apache" is easy, but we did not make it to create user "www-data" and running php-fpm correctly with that user: so at the end we left php-fpm running with user "apache" (so changing ownership of ez document root accordingly).
* in /etc/nginx/fastcgi_params we had to add the following line
fastcgi_param SCRIPT_FILENAME $request_filename;
the rest seems the same so far.
does anybody know additional issues?
Thursday 22 November 2012 8:37:41 pm
Quote from Francesco Ronzon :* in /etc/nginx/fastcgi_params we had to add the following line
fastcgi_param SCRIPT_FILENAME $request_filename;
First of all, sorry for the late reply - I hadn't been watching this thread for a while, but it's nice to see people are using it ![]()
The above is standard on the Debian 6 distribution of nginx - and for comparison, here are all the standard fastcgi_params values:
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
#fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
Modified on Thursday 22 November 2012 8:47:50 pm by Daniel Arnrup-Øien
You must be logged in to post messages in this topic!