This is an example configuration for running Shopware using nginx. Which is a high-performance non-blocking HTTP server.
This configuration is heavily inspired by perusio's drupal-configuration.
Please only use nginx if you know what you are doing. Shopware AG provides no support for running nginx as appserver. Also note that Shopware will not run faster with nginx. A properly configured apache webserver is in most cases as fast as nginx.
This configuration is tested with Shopware 5.1 or later.
-
Move the old
/etc/nginx
directory to/etc/nginx.old
. -
Clone the git repository from github:
git clone https://github.com/bcremer/shopware-with-nginx.git /etc/nginx
-
Setup the PHP-FPM upstream in
conf.d/upstream.conf
-
Edit or copy the
sites-available/example.com.conf
configuration file to suit your requirements. -
Enable your site configuration
ln -s ../sites-available/example.com.conf /etc/nginx/sites-enabled/
-
Reload nginx