Skip to content

Commit 50a2b57

Browse files
authored
Merge pull request #384 from moon-hn/object-storage-path-styles
Adding information about the path-style config
2 parents 8261e59 + 51ab719 commit 50a2b57

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

docs/ecommerce-applications/magento-2/how-to-configure-remote-storage-for-magento-2-x.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ bin/magento setup:config:set system/media_storage_configuration/media_storage 0
3232

3333
If you're using Hypernode Object Storage or a different provider than AWS S3, you need to specify the `--remote-storage-endpoint` option.
3434

35+
For Hypernode Object Storage, use `main` as the bucket name and `EU` as the region. You can retrieve the remaining parameters by running `hypernode-object-storage info --with-credentials`.
36+
37+
```console
38+
app@abcdef-example-magweb-cml:~$ hypernode-object-storage info --with-credentials
39+
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
40+
| UUID | Name | Plan | Hypernodes | Management URL | Access Key | Secret Key |
41+
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
42+
| 12345678-9012-3456-b7e3-19ab43df4a23 | testappbucket1 | OS200GB | testapp | https://example.ams.objectstore.eu | abcd1234 | 1234abcd |
43+
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
44+
```
45+
46+
If you're using a different object storage provider, replace these values with the relevant details from your provider.
47+
3548
```bash
3649
bin/magento setup:config:set \
3750
--remote-storage-driver="aws-s3" \
@@ -42,18 +55,33 @@ bin/magento setup:config:set \
4255
--remote-storage-endpoint="https://my-s3-compatible.endpoint.com"
4356
```
4457

45-
For Hypernode Object Storage, use `main` as the bucket name and `EU` as the region. You can retrieve the remaining parameters by running `hypernode-object-storage info --with-credentials`.
58+
Running the Magento object storage command may not include all necessary settings in the configuration.
4659

47-
```console
48-
app@abcdef-example-magweb-cml:~$ hypernode-object-storage info --with-credentials
49-
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
50-
| UUID | Name | Plan | Hypernodes | Management URL | Access Key | Secret Key |
51-
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
52-
| 12345678-9012-3456-b7e3-19ab43df4a23 | testappbucket1 | OS200GB | testapp | https://example.ams.objectstore.eu | abcd1234 | 1234abcd |
53-
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
60+
If you're using Hypernode object storage, you need to add the following parameters to your env.php to complete the setup:
61+
62+
```php
63+
'use_path_style_endpoint' => true,
64+
'path_style' => true,
5465
```
5566

56-
If you're using a different object storage provider, replace these values with the relevant details from your provider.
67+
The complete and functional Magento configuration should resemble the following example:
68+
69+
```php
70+
'remote_storage' => [
71+
'driver' => 'aws-s3',
72+
'config' => [
73+
'endpoint' => '',
74+
'bucket' => 'main',
75+
'region' => 'EU',
76+
'use_path_style_endpoint' => true,
77+
'path_style' => true,
78+
'credentials' => [
79+
'key' => '',
80+
'secret' => ''
81+
]
82+
]
83+
],
84+
```
5785

5886
**AWS S3**
5987

0 commit comments

Comments
 (0)