This article is a continuation of Improving Performance of OXID Shops – Part 01
A configuration variable can be introduced into config.inc.php 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 = 'http://www.myshop.de:801/';
In 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 nginx.org 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;
server_name www.myshop.de;
access_log /var/log/nginx/localhost.access.log;
location / {
root /home/myshop/www/out/pictures/;
index index.html index.htm;
}
Obviously, here www.myshop.de is the URL of your shop, files for which load from/home/myshop/www/ ($SHOP) and the pictures load from $SHOP/out/pictures.
Processes
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 oxid@euroblaze.de.
Tags: Apache, Images, Media Files, NGINX, Performance Optimization, pictures, Product Image Quality, Speed
Category Miscellaneous
When creating B2C e-Commerce Shops, it is important to provide a high performance of online-shops. For one thing it is important to keep an online-shop fast so that they are able to “quickly take care of business” and hence better the conversion rate. For the other it is important to plan sufficient capacity so the the number of users/buyers can scale, even so in high-peak seasons.

The classical LAMP installation, though powerful in it’s server-side processing capabilities and features, is usually not the fastest server solution for certain types of data such as static media content such as images and videos. Due to this OXID shops hosted on LAMP, while relying on Apache2/PHP5 and MySQL’s robust features, can benefit significantly in speed by relying on a high-performance static-content servers, such as NGINX.
There are several server configurations possible:
- Apache and NGINX running on the same machine, the former hosting the OXID eSales application and the latter hosting only the related static content.
- Apache running on an application server (AS) machine and NGINX serving static content (CS, Content-Server) from a separate machine.
- Apache running on an application server, and NGINX service content from a network of content servers – a classical Content Delivery Network (CDN)
This series of articles explains how to setup OXID eSales shops in the 3 above configurations.
Inspiration & Resources
Inspiration for this solution was taken from the following resources:
Tags: Apache, Images, Media Files, NGINX, Performance Optimization, pictures, Product Image Quality, Speed, Zoom
Category OXID Administrators, OXID Developers
If you are using special zoom-tools like Magic Zoom, you may have to make modifications to the integration module with OXID, so that the tool uses appropriate high-performance URL for loading media-content.
Tags: Apache, Images, NGINX, Performance, pictures, Product Image Quality, Speed, Zoom
Category OXID Developers
If you interested in maximizing the quality of products images in an OXID e-Sales shop, a setting of 0 to 100 is available in /admin/ which defines the quality level gdlib applies while processing images while uploading them from backend.
_
Please note that image-quality is applied when the image is initially uploaded. So you will have to upload your images again in order to see the changes reflect on the shop-frontend.
Tags: Images, Product Image Quality, Products
Category Shop Owners