Multistore in subfolders setup in Nginx

One Magento installation can serve multiple websites or store views that use different languages, domain names and categories. This enables one Magento installation and Admin to manage different stores on multiple domains. For example, you can create one set of categories and products for one domain and another set for a domain that has different […]

Read more

Protect your Magento store with a password in Nginx

Hypernode makes use of Nginx. Nginx does not use .htaccess files like Apache does. This means that configuration now has to be done in a different format, explained in the Nginx documentation. To protect a directory with a password in Nginx, you can use the same htpasswd file that is used with Apache. To restrict […]

Read more

Redirect all HTTP traffic to HTTPS in Nginx

Redirecting all traffic (when Varnish is not used) To redirect all traffic from HTTP to HTTPS, open the server.rewrites with your editor:

Then add the following snippet:

Now finish saving the option using CTRL+o followed by CTRL+x To check if all went well, check if /data/web/nginx/nginx_error_output is present containing an error message. If you […]

Read more

Redirect domains to your staging environment

If you are working on a staging environment that contains domains that are not configured on the production shop, you can easily redirect those domains to staging rather than serving the default storefront. To do this, first create a /data/web/nginx/http.staging_redir_mapping file containing:

Next, create a snippet to redirect all sites mapped as staging_site to […]

Read more

Redirect from or to www

Many constructions are possible when it gets to the base URL. Some shop owners prefer a domain name starting with www, others prefer without. There are some restrictions when choosing your base URL. If you use the wwwizer servers, which are typically used when your domain is not hosted at Byte and thus the DNS […]

Read more

Restrict access to admin area by IP

It is very important to restrict access to your Magento admin panel. Hypernodes do have a Fail2Ban though, but if your password has been leaked, hackers will have access to all your data and your customers data with all the consequences that entails. One of the best ways to restrict access is by limiting the […]

Read more

Rewriting and redirecting URLs in Nginx

Hypernode makes use of Nginx. Nginx does not use .htaccess files like Apache does. This means that configuration previously done in .htaccess files now has to be done in a different format, explained in the nginx documentation. Generally you want rewrite rules if you have moved (parts of) your site to a different folder or […]

Read more

Setting the server name in Nginx

Hypernode makes use of Nginx. Nginx has much better performance than Apache, and allows us to serve your webshop to many more visitors than Apache would. Some Magento module licenses, like OneStepCheckout, are tied to a specific server name (accessible in the environment variable SERVER_NAME). This article explains how to set the server name in […]

Read more

Speedup your Magento shop by tuning GZIP compression

Introduction On Hypernodes, GZIP Compression is already configured to compress responses larger than 1000 bytes. For experts however, it is possible to make your own adjustments to tune GZIP Compression. Nginx already applies compression on requests proxied through PHP-FPM, so you should not set zlib.output_compression = On in your PHP settings. This is an advanced […]

Read more

Using a basic staging environment with Magento 1

A staging environment is very useful, for things such as: Let a customer (shop-owner) click around a proposed change Quickly make a copy of a production shop to analyse a bug that didn’t show up during development Automated testing by external tools This article explaines how you set one up on Hypernode for a Magento 1 shop. […]

Read more