Adding custom headers to a file or a location

To add a certain HTTP header to a file, create a server.headers file in /data/web/nginx, containing the following snippet:

If you want to do the same using a regex of all files that should have this additional header, that’s possible too:

Or even on all files:

If you want to override, for […]

Read more

Basic authentication on Hypernode development plans

Byte offers its customers discounted development plans of all the regular Hypernode plans for development and testing. These plans are meant to develop one webshop at the time, to run all the tests you can think of, and to give your customer (the shop-owner) access during development. Keep in mind though, these development plans cannot […]

Read more

Blocking user agents and or referrer sites

Blocking and allowing IP-addresses is done using the Nginx access module. The ngx_http_access_module module allows limiting access to certain client addresses. Before you start Be very carefully when blocking IP’s, user agents or referrers, as it is relatively easy to block more agents then you want.  When adding block entries, make sure to check your access […]

Read more

Blocking/allowing IP-addresses in Nginx

Hypernode makes use of Nginx (pronunciation: ‘Engine X’). Nginx performs better than Apache for the same amount of visitores, this allows us to serve your webshop to more visitors than Apache could. Nginx does not use .htaccess files like Apache. This means that configuration previously done in .htaccess files now has to be done in […]

Read more

Configure run codes and run types 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

Create a robots.txt for your Magento 1 shop

Using robots.txt for Magento Introduction Using a robots.txt is essential for instructing bots and crawlers how and at which rate your shop should be indexed. In this article we explain how to configure your Hypernode to serve a robots.txt for one or multiple storefronts. Manage multiple robots.txt for multiple storefronts If you want to use […]

Read more

Create reusable config for Nginx to include in custom snippets

Working with includes In Nginx you can use the include statement to avoid duplicate configuration for multiple locations. This can be very useful to keep your configuration files tidy and clear. In this article we describe some options. Create a whitelist If you work with additional applications like phpRedisAdmin, Adminer, Magmi or PHPmyAdmin on a […]

Read more

Deny access to locations and directories

If you want to protect a directory from being accessed through the web, create a location and deny access to it:

Read more

Enable the Magento API

To enable the Magento API, first create the correct users. The Magento API is supposed to work out-of-the box on Hypernodes, but due to clean-url-rewrites sometimes the API does not work and returns a 404 error. To resolve this issue, some additional configuration is required. Use the following snippet and save it as /data/web/nginx/server.api to […]

Read more

Fixing bad performance caused by bots and crawlers

First: do you have a problem?  Generally, performance for regular shop visitors might be affected if you have more than 10 bot pageviews per minute or bot traffic exceeds 50% of total pageviews. MageReport Premium offers a handy graph that displays the summary of live bot traffic. When your shop has at least 1600 PHP requests in […]

Read more