Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions docs/best-practices/testing/how-to-go-live-with-your-hypernode.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ Flush the cache of Magento on the Hypernode. (`magerun cache:flush`)

## Step 7: Set up Hypernode Managed Vhosts

The Hypernode Managed Vhosts (HMV) system is currently enabled by default on all new booted Hypernodes (all Hypernodes created after 01-05-2020).

Check if you have HMV enabled by running this command:

```console
app@abcdef-example-magweb-cmbl:~$ hypernode-systemctl settings managed_vhosts_enabled
managed_vhosts_enabled is set to value True
```

If this is not enabled, skip the part below.

Due to this configuration it is required to add a new vhost for every domain you want to link to your Hypernode. So you need to configure your DNS correctly and add a new vhost for the domain.

To add a new vhost, for example the domainname [www.example.com](http://www.example.com), to your configuration, you can simply run the command `hypernode-manage-vhosts www.example.com`. This will create a new vhost configuration in `/data/web/nginx/www.example.com/`, using the Magento 2 template.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ redirect_from:

Akeneo 3 preferably requires a Hypernode Pelican L, Falcon M, Eagle M hosting plan or larger. You can either choose to install it on a seperate Hypernode instance or on the same Hypernode as your Magento or Shopware installation. If you choose the latter you have to make sure that you have enough resources (disk space, memory and CPU) left. Furthermore you need to make sure that you are already using **MySQL 5.7, PHP 7.2 and Elasticsearch 6.x**, so it won’t affect your shop negatively. Installing Akeneo version 3.x may take up to 15 minutes.

## Enable managed_vhosts
## Managed Vhosts

All new Hypernodes (from April 2020) will automatically be booted with [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). If you already have an older Hypernode, then you need to enable Hypernode Managed Vhosts by running the following command:

```bash
hypernode-systemctl settings managed_vhosts_enabled True
```
Hypernode uses [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). Ensure you have a vhost for your Akeneo domain.

## Create a Managed_vhost for a (Sub)Domain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ redirect_from:

Akeneo 4 preferably requires a Hypernode Pelican L, Falcon M, Eagle M hosting plan or larger. You can either choose to install it on a seperate Hypernode instance or on the same Hypernode as your Magento or Shopware installation. If you choose the latter you have to make sure that you have enough resources (disk space, memory and CPU) left. Furthermore you need to make sure that you are already using **MySQL 8.0, PHP 7.3 and Elasticsearch 7.x**, so it won’t affect your shop negatively. Installing Akeneo version 4.x may take up to 15 minutes.

## Enable managed_vhosts
## Managed Vhosts

All new Hypernodes (from April 2020) will automatically be booted with [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). If you already have an older Hypernode, then you need to enable Hypernode Managed Vhosts by running the following command:

```bash
hypernode-systemctl settings managed_vhosts_enabled True
```
Hypernode uses [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). Ensure you have a vhost for your Akeneo domain.

## Create a Managed_vhost for a (Sub)Domain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ redirect_from:

Akeneo 5 preferably requires a Hypernode Pelican L, Falcon M, Eagle M hosting plan or larger. You can either choose to install it on a seperate Hypernode instance or on the same Hypernode as your Magento or Shopware installation. If you choose the latter you have to make sure that you have enough resources (disk space, memory and CPU) left. Furthermore you need to make sure that you are already using **MySQL 8.0, PHP 7.4 and Elasticsearch 7.x**, so it won’t affect your shop negatively. Installing Akeneo version 5.x may take up to 15 minutes.

## Enable managed_vhosts
## Managed Vhosts

All new Hypernodes (from April 2020) will automatically be booted with [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). If you already have an older Hypernode, then you need to enable Hypernode Managed Vhosts by running the following command:

```bash
hypernode-systemctl settings managed_vhosts_enabled True
```
Hypernode uses [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). Ensure you have a vhost for your Akeneo domain.

## Create a Managed_vhost for a (Sub)Domain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ redirect_from:

Akeneo 6 preferably requires a Hypernode Pelican L, Falcon M, Eagle M hosting plan or larger. You can either choose to install it on a seperate Hypernode instance or on the same Hypernode as your Magento or Shopware installation. If you choose the latter you have to make sure that you have enough resources (disk space, memory and CPU) left. Furthermore you need to make sure that you are already using **MySQL 8.0, PHP 8.0 and Elasticsearch 7.x**, so it won’t affect your shop negatively. Installing Akeneo version 6.x may take up to 15 minutes.

## Enable managed_vhosts
## Managed Vhosts

All new Hypernodes (from April 2020) will automatically be booted with [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). If you already have an older Hypernode, then you need to enable Hypernode Managed Vhosts by running the following command:

```bash
hypernode-systemctl settings managed_vhosts_enabled True
```
Hypernode uses [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). Ensure you have a vhost for your Akeneo domain.

## Create a Managed_vhost for a (Sub)Domain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ redirect_from:
Akeneo 7 preferably requires a Hypernode Pelican L, Falcon M, Eagle M hosting plan or larger. You can either choose to install it on a seperate Hypernode instance or on the same Hypernode as your Magento or Shopware installation. If you choose the latter you have to make sure that you have enough resources (disk space, memory and CPU) left. Furthermore you need to make sure that you are already using **MySQL 8.0, PHP 8.1 and OpenSearch 2.x**, so it won’t affect your shop negatively. Installing Akeneo version 7.x may take up to 15 minutes.\
**Important note: Akeneo 7.x requires MySQL 8.0.30, which is only available on Debian Bookworm.**

## Enable managed_vhosts
## Managed Vhosts

All new Hypernodes (from April 2020) will automatically be booted with [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). If you already have an older Hypernode, then you need to enable Hypernode Managed Vhosts by running the following command:

```bash
hypernode-systemctl settings managed_vhosts_enabled True
```
Hypernode uses [Hypernode Managed Vhosts](../../hypernode-platform/nginx/hypernode-managed-vhosts.md). Ensure you have a vhost for your Akeneo domain.

## Create a Managed_vhost for a (Sub)Domain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,6 @@ In our support documentation you will find detailed information about installing

### Step 4 – Set up Hypernode Managed Vhosts

The Hypernode Managed Vhosts (HMV) system is currently enabled by default on all new booted Hypernodes (all Hypernodes created after 01-05-2020).

Check if you have HMV enabled by running this command:

`hypernode-systemctl settings managed_vhosts_enabled`

If so, it will give the following output:

`managed_vhosts_enabled is set to value True`

If this is not enabled, skip the part below.

Due to this configuration it is required to add a new vhost for every domain you want to link to your Hypernode. So you need to configure your DNS correctly and add a new vhost for the domain.

To add a new vhost, for example the domainname [www.example.com](http://www.example.com), to your configuration, you can simply run the command `hypernode-manage-vhosts www.example.com`. This will create a new vhost configuration in `/data/web/nginx/www.example.com/`, using the Magento 2 template.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,7 @@ Don’t fancy these solutions? Migrate your domain to Hypernode and let us manag

## DNS and Hypernode Managed Vhosts

The Hypernode Managed Vhosts (HMV) system is currently enabled by default on all newly booted Hypernodes (all Hypernodes created after 01-05-2020).

Check if you have HMV enabled by running this command:

`hypernode-systemctl settings managed_vhosts_enabled`

If so, it will give the following output:

`managed_vhosts_enabled is set to value True`

If this isn't enabled, you can just skip the part below.

Due to this configuration, it is required to add a new vhost for every domain you want to link to your Hypernode. So you need to configure your DNS correctly and add a new vhost for the domain.
With Hypernode Managed Vhosts (HMV), you must add a new vhost for every domain you want to link to your Hypernode. So you need to configure your DNS correctly and add a new vhost for the domain.

To add a new vhost, for example the domain name `www.example.com`, to your configuration, you can run the command `hypernode-manage-vhosts www.example.com`. This will create a new vhost configuration in `/data/web/nginx/www.example.com/`, using the Magento 2 template.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,13 @@ You can find more in-depth information in [this article about SSL on Hypernode](

Please check out [this article](../ssl/how-to-use-ssl-certificates-on-your-hypernode-when-ordered-via-hypernode-com.md) for the different SSL options when you use the Hypernode Control Panel.

## Order Let’s Encrypt Certificates

### On Hypernodes With Hypernode Managed Vhosts Enabled

**Please note: If you want to use Let’s Encrypt and have the Hypernode Managed Vhosts (HMV) system enabled, you need to configure LE during the creation of the vhost. Using the old method with dehydrated won't work!**

First, check if HMV is enabled on your Hypernode:

`hypernode-systemctl settings managed_vhosts_enabled`

If so, it will give the following output:

`managed_vhosts_enabled is set to value True`
## How to Use Let’s Encrypt (LE) Certificates

If you want to request a LE certificate you need to add the `--https` flag with the HMV-command.

`hypernode-manage-vhosts www.example.com --https --force-https`

This command will not only request a LE Certificate but because of the --force-https flag it will also redirects all traffic for that specific vhost to HTTPS.

### On Hypernodes Without Hypernode Managed Vhosts Enabled

To order [Let’s Encrypt](../ssl/how-to-use-lets-encrypt-on-hypernode.md) certificates for all storefronts, use the following command:

```bash
## Create an entry for each storefront
for DOMAIN in $( n98-magerun sys:store:config:base-url:list --format=csv | sed 1d | cut -d , -f 3 | perl -pe "s/https?://(www.)?//" | tr -d "/" | sort -u ); do
echo -e "$DOMAIN www.${DOMAIN}" >> ~/.dehydrated/domains.txt
done

## Order the certificates
dehydrated -c --create-dirs
```

Don’t forget to [add the cron to renew your certificates](../ssl/how-to-use-lets-encrypt-on-hypernode.md) to the crontab if you are using Let’s Encrypt!
This command will not only request a LE Certificate but, because of the --force-https flag, it will also redirect all traffic for that specific vhost to HTTPS.

## Changing Your Base URLs

Expand All @@ -79,17 +51,9 @@ If this is done by Magento, the database and PHP are used for making this redire

This is why we must configure this in Nginx, so the redirect does not use unnecessary resources.

Run the following command to add the configuration to Nginx that routes all traffic over HTTPS:
Run the following command to configure a vhost to automatically redirect all traffic to HTTPS:

Create the following file at `/data/web/nginx/public.ssl_redirect.conf`:

```nginx
if ($scheme = http) {
return 301 https://$host$request_uri;
}
```

**Please note that if you have [Hypernode Managed Vhosts](hypernode-managed-vhosts.md) enabled, you can skip this.**
`hypernode-manage-vhosts www.example.com --https --force-https`

## Check Settings of Third Party Solutions

Expand Down
14 changes: 1 addition & 13 deletions docs/hypernode-platform/nginx/how-to-redirect-from-or-to-www.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ More info can be found [on our page about setting your DNS](../dns/how-to-manage

## Redirect From Apex to WWW

**When hypernode-managed-vhosts enabled**
**When Hypernode Managed Vhosts is enabled**

To redirect all traffic to www you have to create both a vhost for the Apex and for the `www`. For the non-www vhost you can create the vhost as type wwwizer. This will redirect all traffic to the `www`. version of that vhost. This can be achieved by running: `hypernode-manage-vhosts example.com --type wwwizer`.

Expand All @@ -34,18 +34,6 @@ To redirect all traffic to www you have to create both a vhost for the Apex and
| www.example.com | magento2 | False | False | False | False | intermediate |
```

**Without hypernode-manage-vhosts enabled (old legacy nginx-config)**

You can redirect all traffic to www with the following Nginx snippet:

```nginx
if ($http_host ~* "^example.com$") {
rewrite ^ https://www.$http_host$request_uri;
}
```

Save this snippet in `/data/web/nginx/server.rewrites`.

## Redirect From WWW to Apex

To redirect all traffic from www to the apex domain use the following Nginx snippet:
Expand Down
50 changes: 1 addition & 49 deletions docs/hypernode-platform/nginx/hypernode-managed-vhosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ Please take not that the webroot option is not used for the built-in staging for

**Please note: If you want to use Let’s Encrypt and have the Hypernode Managed Vhosts (HMV) system enabled, you need to configure LE during the creation of the vhost. Using the old method with *dehydrated* won't work!**

First, check if HMV is enabled on your Hypernode:

`hypernode-systemctl settings managed_vhosts_enabled`

If so, it will give the following output:

`managed_vhosts_enabled is set to value True`

If you want to request a LE certificate you need to add the `--https` flag with the HMV-command.

`hypernode-manage-vhosts www.example.com --https --force-https`
Expand Down Expand Up @@ -114,7 +106,7 @@ hypernode-manage-vhosts example.com --object-storage-defaults

### Vhost-specific configuration

Once you have setup a vhost, say [www.example.com](http://www.example.com), you can place your domain specific configuration in its configuration folder, /data/web/nginx/[www.example.com](http://www.example.com). You can do this the same way you configured your legacy, or global configuration. Simply place a file with a `server.` prefix, and it will be included in the vhost's server {} configuration block. You can also still use the `public.` and `staging.` prefixes, if you wish to have public, or staging, specific configuration.
Once you have setup a vhost, say [www.example.com](http://www.example.com), you can place your domain specific configuration in its configuration folder, /data/web/nginx/[www.example.com](http://www.example.com). You can do this the same way you configure your global configuration. Simply place a file with a `server.` prefix, and it will be included in the vhost's server {} configuration block. You can also still use the `public.` and `staging.` prefixes, if you wish to have public, or staging, specific configuration.
Please note that any files with the 'HTTP.' prefix will also be loaded in the HTTP context. Nginx, however, only has a single http context. As such, any http configuration placed in a vhost, will also be loaded for all other vhosts.

### Global configuration
Expand All @@ -132,43 +124,3 @@ If you are running into issues (e.g. SSL or other configuration errors) with Hyp
`hypernode-manage-vhosts --all`

This regenerates the HMV configuration based on what is set in `hypernode-manage-vhosts --list` and in our experience resolves most basic issues with Hypernode Managed Vhosts.

## Enabling Managed Vhosts

The Hypernode Managed Vhosts (HMV) system is currently enabled by default on all new booted Hypernodes.

However if you have a Hypernode created before 01-05-2020 your Hypernode may still be running in 'legacy' mode. To enable the HMV you can run the command:

`hypernode-systemctl settings managed_vhosts_enabled True`.

This will convert your current legacy config into the HMV config. It will also convert all currently active vhosts into managed vhosts.

Please note that while switching to HMV is very easy, there are a few things to check after switching to make sure everything works, as not every setting is automatically transferred.

Run `hypernode-manage-vhosts --list` to get an overview of your current configuration and use the list below to check if it's correct. Not everything will apply to your Hypernode.

- Make sure your domain is the default server instead of the Hypernode. You can do this by running the following command:

`hypernode-manage-vhosts www.example.com --default-server`

- Configure the vhosts to only use HTTPS. If you already have an SSL certificate configured and you don't want to use Let's Encrypt, use this command:

`hypernode-manage-vhosts www.example.com --https --force-https --ssl-noclobber`

This will make sure you won't overwrite the existing SSL certificate.

If you do want to configure Let's Encrypt for the vhost you can use this command:

`hypernode-manage-vhosts www.example.com --https --force-https`

- If you make use of Varnish, make sure to enable Varnish for the specific vhosts:

`hypernode-manage-vhosts www.example.com --varnish`

- Want to redirect all traffic over www? Set up your naked domains to be wwwizers, with this command:

`hypernode-manage-vhosts --type wwwizer [example.com](//example.com)`

Please make sure to also double check your custom Nginx configurations, as these might not be converted automatically.

You can always use `hypernode-manage-vhosts --help` to get more information on the different configurations.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ It is possible to switch to the [Modern Compatibility Settings](https://wiki.moz

#### Mozilla Modern Configuration and Hypernode Managed Vhosts

The Hypernode Managed Vhosts (HMV) system is currently enabled by default on all new booted Hypernodes (booted after 01-05-2020). Read more about HMV [here](../nginx/hypernode-managed-vhosts.md).
Hypernode uses Managed Vhosts (HMV) for per-domain configuration. Read more about HMV [here](../nginx/hypernode-managed-vhosts.md).

When you have different vhosts configured, you also need to enable the SSL config **per vhost**. You do this by running this command:

Expand Down
Loading