NGINX for OXID eShop Images and Media Files – Part 02

This article is a continuation of Improving Performance of OXID Shops – Part 01

A configuration variable can be introduced into for specifying a URL for specifying an alternative location for images and other static media files like site-videos, flash-content or downloadable PDF etc.

$this->sAltImageDir = '';

OXID Need for SpeedIn our example, this particular location, is where our /out/pictures/ folder is mapped to. An NGINX server listens on port 801.

In this example we used the same server for hosting the Apache application-server (AAS) as well as the NGINX content-server (NCS) on the same server-instance.

The following sections contain a detailed account of how NGINX can be configured on a Debian Lenny/5.0 server.

NGINX on Debain 5.0/Lenny for OXID eShops

Debian/5.0 ships with Version 0.6.x of NGINX (latest from is version 0.8.x), which works just well for our purpose.

NGINX configuration files and organization in the /etc/ folder is similar to that of Apache2.  Individual sites and Virtualhost(s) (or simply called server(s) in NGINX jargon) can be configured in /etc/nginx/sites-enabled/default.   The configuration block for our tests simply looks like:

server {
     listen   801;
     access_log  /var/log/nginx/localhost.access.log;
  location / {
     root   /home/myshop/www/out/pictures/;
     index  index.html index.htm;

Obviously, here is the URL of your shop, files for which load from/home/myshop/www/ ($SHOP) and the pictures load from $SHOP/out/pictures.


The process list on the web-server instance looks as follows:

vm0:~# ps ax | grep -E "apache|nginx"
 1889 ?        Ss     0:00 /usr/sbin/apache2 -k start
 1905 ?        S      0:00 /usr/sbin/apache2 -k start
 1906 ?        S      0:00 /usr/sbin/apache2 -k start
 1907 ?        S      0:00 /usr/sbin/apache2 -k start
 1908 ?        S      0:00 /usr/sbin/apache2 -k start
 1909 ?        S      0:00 /usr/sbin/apache2 -k start
 2058 pts/0    S+     0:00 grep apache
 1756 ?        Ss     0:00 nginx: master process /usr/sbin/nginx
 1757 ?        S      0:00 nginx: worker process
 2060 pts/0    S+     0:00 grep nginx

For optimizing performance your OXID eShop or getting a new one developed, please contact euroblaze at +49-711-7947-2394 or

Leave a Reply