You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In any case, that is much faster than Magento's built-in sync, because `aws s3 sync` uploads files concurrently.
82
+
Both methods are significantly faster than Magento’s built-in sync, as aws s3 sync handles uploads concurrently.
86
83
87
84
## The storage flag file in the bucket
88
85
89
86
Magento's S3 implementation creates a test file called `storage.flag`, which is basically created to test if the connection works. So this is not a magic file to mark anything ([source](https://github.com/magento/magento2/blob/6f4805f82bb7511f72935daa493d48ebda3d9039/app/code/Magento/AwsS3/Driver/AwsS3.php#L104)).
90
87
91
88
## Serving assets from your S3 bucket
92
89
93
-
To start serving media assets from your S3 bucket, you need to make some adjustments to your nginx configuration. Luckily, `hypernode-manage-vhosts` does this for you! If you are using Hypernode's object storage solution, all you need to do is run the following for relevant vhosts:
90
+
To serve media assets directly from your S3 bucket, you need to adjust your Nginx configuration.
91
+
Fortunately, `hypernode-manage-vhosts` simplifies this process for you. If you're using Hypernode's object storage solution,
92
+
simply run the following command for the relevant vhosts:
94
93
95
94
```bash
96
95
hmv example.com --object-storage
97
96
```
97
+
### Using a custom object storage solution
98
+
99
+
If you're using a custom storage provider, such as Amazon S3, you'll need to specify the bucket name and URL manually:
98
100
99
-
In the case that you're using custom object storage, such as Amazon's S3, you will need to supply the bucket name and the bucket URL yourself:
If you have previously set your own custom bucket name and URL, but have since switched to Hypernode's object storage solution, then you can use the `--object-storage-defaults` flag to force overwrite your values to Hypernode's default ones:
105
+
### Switching back to Hypernode defaults
106
+
107
+
If you previously set a custom bucket and URL but want to revert to Hypernode's default object storage, use the `--object-storage-defaults` flag:
Furthermore, if you're using Amazon S3 as your bucket, ensure that your S3 bucket policies are configured correctly, so that only `/media` is publicly readable. For example:
113
+
### Configuring Amazon S3 bucket policies
114
+
115
+
If you’re using Amazon S3, ensure that your S3 bucket policies are properly configured so that only the `/media` directory is publicly accessible. For example:
0 commit comments