回答編集履歴

3

誤記修正

2019/03/29 09:04

投稿

ikedas
ikedas

スコア4335

test CHANGED
@@ -16,7 +16,7 @@
16
16
  ではこれでは (動くか試していませんが)。
17
17
 
18
18
  ```code
19
- ProxyPassMatch ^/([^/]+)/ddd/ http://192.168.1.1:40180/$1/ddd/
19
+ ProxyPassMatch ^/([^/]+)/ddd/(.*) http://192.168.1.1:40180/$1/ddd/$2
20
20
  ProxyPassReverse / http://192.168.1.1:40180/
21
21
  ```
22
22
 

2

設定を足さなくてすむバージョン

2019/03/29 09:04

投稿

ikedas
ikedas

スコア4335

test CHANGED
@@ -13,3 +13,12 @@
13
13
  ...
14
14
  ```
15
15
 
16
+ ではこれでは (動くか試していませんが)。
17
+
18
+ ```code
19
+ ProxyPassMatch ^/([^/]+)/ddd/ http://192.168.1.1:40180/$1/ddd/
20
+ ProxyPassReverse / http://192.168.1.1:40180/
21
+ ```
22
+
23
+ ProxyPassReverseに関するリバースプロキシ変換はプロキシ先のサーバから返ってきたもののみに働くはずなので、1行ですむでしょう。
24
+

1

複数書く例

2019/03/29 09:03

投稿

ikedas
ikedas

スコア4335

test CHANGED
@@ -8,5 +8,8 @@
8
8
  ```code
9
9
  ProxyPass /aaa/ddd/ http://192.168.1.1:40180/aaa/ddd/
10
10
  ProxyPassReverse /aaa/ddd/ http://192.168.1.1:40180/aaa/ddd/
11
+ ProxyPass /aaa2/ddd/ http://192.168.1.1:40180/aaa2/ddd/
12
+ ProxyPassReverse /aaa2/ddd/ http://192.168.1.1:40180/aaa2/ddd/
13
+ ...
11
14
  ```
12
15