Skip to content

Commit 2f77abd

Browse files
committed
fix: added changes requested
1 parent e6b04f8 commit 2f77abd

File tree

2 files changed

+107
-12
lines changed

2 files changed

+107
-12
lines changed

docs/best-practices/storage/object-storage-service/accessing-obs-through-an-nginx-reverse-proxy.md

Lines changed: 107 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ tags: [storage, obs, reverse-proxy, nginx]
66

77
# Accessing OBS Through an NGINX Reverse Proxy
88

9-
Generally, you can access OBS using a bucket's access domain name [for
10-
example](https://**bucketname**.obs.eu-de.otc.t-systems.com)
9+
Generally, you can access OBS using a bucket's access domain name (for
10+
example, **https://`bucketname`.obs.eu-de.otc.t-systems.com**)
1111
provided by OBS or using a user-defined domain name bound to an OBS
1212
bucket.
1313

@@ -34,11 +34,7 @@ actual domain name or IP address of OBS is hidden.
3434
proxy](/img/docs/best-practices/storage/object-storage-service/en-us_image_0273872842.png)
3535

3636
## Prerequisites
37-
38-
- You have known the region and access domain name of the bucket. For
39-
example, the access domain name of a bucket in the eu-de region is
40-
`nginx-obs.obs.eu-de.otc.t-systems.com`. To obtain the
41-
information, see [Querying Basic Information of a
37+
- You know the region and access domain name of the bucket. For example, the access domain name of a bucket named `nginx-obs` in the **eu-de** region is `nginx-obs.obs.eu-de.otc.t-systems.com`. To obtain the information, see [Querying Basic Information of a
4238
Bucket](https://docs.otc.t-systems.com/object-storage-service/umn/obs_browser_operation_guide/managing_buckets/viewing_basic_information_of_a_bucket.html).
4339
- You have a Linux ECS **in the same region**. CentOS is used here as an
4440
example. For details, see [Creating an
@@ -110,9 +106,12 @@ b. Press the *i* key to go to the edit mode and modify the
110106
| Parameter | Description |
111107
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
112108
| server_name | IP address that provides the reverse proxy service. It is the fixed IP address that is exposed to end users for access. Enter the EIP of the ECS where the NGINX reverse proxy service is deployed. |
113-
| proxy_pass | IP address of the proxied server. Enter the OBS bucket access domain name required in [Prerequisites](#prerequisites). The domain name must start with http:// or https://. <br/><br/> Example: [https://nginx-obs.obs.eu-de.otc.t-systems.com](https://nginx-obs.obs.eu-de.otc.t-systems.com) **Note**: When you use an API, SDK, or obsutil for calling, set this parameter to the region domain name. The following is an example: `obs.eu-de.otc.t-systems.com` |
114-
| proxy_buffering | Whether to enable the proxy buffer. The value can be `on` or `off`. If this parameter is set to on, Nginx stores the response returned by the backend in a buffer and then sends the data to the client. If this parameter is set to off, Nginx sends the response to the client as soon as it receives the data from the backend. Default value: `on` <br/><br/> Example: `proxy_buffering off` |
109+
| proxy_pass | IP address of the proxied server. Enter the OBS bucket access domain name required in [Prerequisites](#prerequisites). The domain name must start with http:// or https://. <br/><br/> Example: [https://nginx-obs.obs.eu-de.otc.t-systems.com](https://nginx-obs.obs.eu-de.otc.t-systems.com)|
110+
| proxy_buffering | Whether to enable the proxy buffer. The value can be `on` or `off`. If this parameter is set to on, Nginx stores the response returned by the backend in a buffer and then sends the data to the client. If this parameter is set to off, Nginx sends the response to the client as soon as it receives the data from the backend. Default value: `on` <br/><br/> Example: `proxy_buffering off` |
115111

112+
:::note
113+
When you use an API, SDK, or obsutil for calling, set **proxy_pass** to the region domain name. The following is an example: `obs.eu-de.otc.t-systems.com`.
114+
:::
116115
c. Press the *ESC* key and enter *:wq* to save the
117116
configuration and exit.
118117

@@ -157,11 +156,107 @@ c. In the navigation pane, choose *Permissions* -> *Bucket
157156

158157
d. Click *Create*.
159158

160-
e. Choose a policy configuration method you like. *Visual Editor*
161-
is used here.
159+
e. Choose a policy configuration method you like. *Visual Editor* is used here.
160+
161+
![*Figure 3* ](/img/docs/best-practices/storage/object-storage-service/policy-visual-editor.png)
162162

163163
f. Configure the following parameters.
164164

165+
<table>
166+
<caption>
167+
<strong>Table 2</strong>
168+
Bucket policy parameters
169+
</caption>
170+
<thead>
171+
<tr>
172+
<th>Parameter</th>
173+
<th></th>
174+
<th>Description</th>
175+
</tr>
176+
</thead>
177+
<tbody>
178+
<tr>
179+
<td>Policy Name</td>
180+
<td></td>
181+
<td>Enter a policy name.</td>
182+
</tr>
183+
<tr >
184+
<td>Policy content</td>
185+
<td>Effect</td>
186+
<td>Select <strong>Allow</strong>.</td>
187+
</tr>
188+
<tr>
189+
<td></td>
190+
<td>Principal</td>
191+
<td>
192+
<ul>
193+
<li>To select <strong>All accounts</strong> enter <strong>*</strong>.</li>
194+
</ul>
195+
</td>
196+
</tr>
197+
<tr>
198+
<td></td>
199+
<td>Resources</td>
200+
<td>
201+
<ul>
202+
<li>
203+
Method 1:
204+
<ul>
205+
<li>Select <strong>Entire bucket (including the objects in it)</strong>.</li>
206+
</ul>
207+
</li>
208+
<li>
209+
Method 2:
210+
<ul>
211+
<li>Select <strong>Current bucket</strong> and <strong>Specified objects</strong>.</li>
212+
<li>Set the resource path to <strong>*</strong> to indicate all objects in the bucket.</li>
213+
</ul>
214+
</li>
215+
</ul>
216+
</td>
217+
</tr>
218+
<tr >
219+
<td></td>
220+
<td>Actions</td>
221+
<td>
222+
<ul>
223+
<li>Choose <strong>Customize</strong>.</li>
224+
<li>Select <strong>Get*</strong> and <strong>List*</strong>.</li>
225+
</ul>
226+
</td>
227+
</tr>
228+
<tr >
229+
<td></td>
230+
<td>Conditions (Optional)</td>
231+
<td>
232+
<ul>
233+
<li><strong>Key</strong>: Select <strong>SourceIp</strong>.</li>
234+
<li><strong>Condition Operator</strong>: Select <strong>IpAddress</strong></li>
235+
<li>
236+
<strong>Value</strong>:
237+
<ul>
238+
<li>
239+
<p>If the ECS uses a public DNS, the value is as follows:</p>
240+
<p><em>Elastic IP address of the ECS</em></p>
241+
</li>
242+
<li>
243+
<p>If the ECS uses a Open Telekom Cloud private DNS, the value is as follows:</p>
244+
<p><strong>100.64.0.0/10,214.0.0.0/7,</strong><em>Private IP address of the ECS</em></p>
245+
</li>
246+
</ul>
247+
</li>
248+
</ul>
249+
</td>
250+
</tr>
251+
</tbody>
252+
</table>
253+
254+
255+
:::note
256+
In conditions you can click **Add** to configure IP addresses (CIDR blocks).
257+
IP addresses in the range starting with **100** or **214** are for ECSs to access OBS through an internal network.
258+
:::
259+
165260
g. Click *Create*.
166261

167262
## Verifying the reverse proxy configuration
@@ -172,5 +267,5 @@ configuration is successful.
172267

173268
For example, visit `http://**ECS EIP**/otc.jpg`.
174269

175-
![*Figure 3* Using a fixed IP address to access OBS
270+
![*Figure 4* Using a fixed IP address to access OBS
176271
resources](/img/docs/best-practices/storage/object-storage-service/en-us_image_0273876194.png)
37.9 KB
Loading

0 commit comments

Comments
 (0)