質問編集履歴
1
upstreamを使わないconfigについて記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -138,6 +138,8 @@
|
|
138
138
|
|
139
139
|
server example.com:443;
|
140
140
|
|
141
|
+
server example.com:443;
|
142
|
+
|
141
143
|
}
|
142
144
|
|
143
145
|
|
@@ -174,4 +176,54 @@
|
|
174
176
|
|
175
177
|
|
176
178
|
|
179
|
+
例えばパスを書き換えるクライアントからのリクエストの場合は、以下のように upstream を使わずに構成しないといけないのでしょうか?
|
180
|
+
|
181
|
+
(これは可用性の観点からビミョウですが...)
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
```
|
186
|
+
|
187
|
+
http {
|
188
|
+
|
189
|
+
upstream backend {
|
190
|
+
|
191
|
+
server example.com:443;
|
192
|
+
|
193
|
+
server example.com:443;
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
server {
|
200
|
+
|
201
|
+
location /test {
|
202
|
+
|
203
|
+
proxy_pass https://example.com/another-test;
|
204
|
+
|
205
|
+
proxy_redirect off;
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
location /hoge {
|
212
|
+
|
213
|
+
proxy_pass https://backend;
|
214
|
+
|
215
|
+
proxy_set_header Host example.com;
|
216
|
+
|
217
|
+
proxy_redirect off;
|
218
|
+
|
219
|
+
}
|
220
|
+
|
221
|
+
}
|
222
|
+
|
223
|
+
}
|
224
|
+
|
225
|
+
```
|
226
|
+
|
227
|
+
|
228
|
+
|
177
229
|
宜しくおねがいします。
|