質問編集履歴

5

curlの結果

2022/08/26 01:42

投稿

tensaikumabouzu
tensaikumabouzu

スコア45

test CHANGED
File without changes
test CHANGED
@@ -31,7 +31,7 @@
31
31
  * schannel: disabled automatic use of client certificate
32
32
  * ALPN: offers http/1.1
33
33
  * ALPN: server accepted http/1.1
34
- > GET /shares HTTP/1.1
34
+ > GET /test HTTP/1.1
35
35
  > Host: node
36
36
  > User-Agent: curl/7.83.1
37
37
  > Accept: */*

4

curlの結果を更新

2022/08/26 01:34

投稿

tensaikumabouzu
tensaikumabouzu

スコア45

test CHANGED
File without changes
test CHANGED
@@ -23,6 +23,38 @@
23
23
  - 補足
24
24
  基本的なリバースプロキシの思想から外れますが、現状検証環境のため、
25
25
  クライアントから172.30.80.100へのアクセスはできます。(これが原因の可能性もある?)
26
+ - curlの結果
27
+ ```ここに言語を入力
28
+ C:\Users\Sysg> curl -v https://node:443/test
29
+ * Trying 172.30.80.91:443...
30
+ * Connected to node (172.30.80.91) port 443 (#0)
31
+ * schannel: disabled automatic use of client certificate
32
+ * ALPN: offers http/1.1
33
+ * ALPN: server accepted http/1.1
34
+ > GET /shares HTTP/1.1
35
+ > Host: node
36
+ > User-Agent: curl/7.83.1
37
+ > Accept: */*
38
+ >
39
+ * Mark bundle as not supporting multiuse
40
+ < HTTP/1.1 301 Moved Permanently
41
+ < Server: nginx/1.18.0 (Ubuntu)
42
+ < Date: Fri, 26 Aug 2022 01:29:15 GMT
43
+ < Content-Type: text/html
44
+ < Content-Length: 162
45
+ < Connection: keep-alive
46
+ < Location: https://node/
47
+ <
48
+ <html>
49
+ <head><title>301 Moved Permanently</title></head>
50
+ <body>
51
+ <center><h1>301 Moved Permanently</h1></center>
52
+ <hr><center>nginx</center>
53
+ </body>
54
+ </html>
55
+ * Connection #0 to host node left intact
56
+ ```
57
+
26
58
 
27
59
  どのようにconfファイルを記述すれば、「実現したいこと」はできますか?
28
60
 

3

補足の追加

2022/08/25 09:57

投稿

tensaikumabouzu
tensaikumabouzu

スコア45

test CHANGED
File without changes
test CHANGED
@@ -20,6 +20,10 @@
20
20
  }
21
21
  }
22
22
  ```
23
+ - 補足
24
+ 基本的なリバースプロキシの思想から外れますが、現状検証環境のため、
25
+ クライアントから172.30.80.100へのアクセスはできます。(これが原因の可能性もある?)
26
+
23
27
  どのようにconfファイルを記述すれば、「実現したいこと」はできますか?
24
28
 
25
29
 

2

修正

2022/08/25 08:30

投稿

tensaikumabouzu
tensaikumabouzu

スコア45

test CHANGED
File without changes
test CHANGED
@@ -3,7 +3,7 @@
3
3
  https://node:443/test のままでhttp://172.30.80.100 のWeb画面を表示すること。
4
4
 
5
5
  - 実現したい理由
6
- クライアントからは、172.30.80.100に直接アクセスさせたくな、あくまでnodeへのアクセスにしたいため。
6
+ クライアントからは、172.30.80.100(管理用サーバー)に直接アクセスさせたくな、あくまでnodeへのアクセスにしたいため。
7
7
 
8
8
  - 困っていること
9
9
  https://node:443/test へブラウザからアクセスすると**URLがhttp://172.30.80.100 に変わってしまい**、http://172.30.80.100 のWeb画面を表示すること。

1

修正を加えました

2022/08/25 04:38

投稿

tensaikumabouzu
tensaikumabouzu

スコア45

test CHANGED
File without changes
test CHANGED
@@ -1,9 +1,12 @@
1
1
  - 実現したいこと
2
2
  https://node:443/test へブラウザからアクセスした際にブラウザに表示されるURLは
3
- https://node:443/test のままでhttps://google.com のWeb画面を表示すること。
3
+ https://node:443/test のままでhttp://172.30.80.100 のWeb画面を表示すること。
4
+
5
+ - 実現したい理由
6
+ クライアントからは、172.30.80.100に直接アクセスさせたくなく、あくまでnodeへのアクセスにしたいため。
4
7
 
5
8
  - 困っていること
6
- https://node:443/test へブラウザからアクセスすると**URLがhttp://google.com に変わってしまい**、http://google.com のWeb画面を表示すること。
9
+ https://node:443/test へブラウザからアクセスすると**URLがhttp://172.30.80.100 に変わってしまい**、http://172.30.80.100 のWeb画面を表示すること。
7
10
 
8
11
  - nginxのconfファイルの設定(部分抜粋)
9
12
  ```ここに言語を入力
@@ -13,10 +16,10 @@
13
16
  listen [::]:443 ssl;
14
17
 
15
18
  location /test {
16
- resolver 8.8.8.8;
17
- set $target google.com;
18
- proxy_pass https://$target;
19
+ proxy_pass http://172.30.80.100;
19
20
  }
20
21
  }
21
22
  ```
22
23
  どのようにconfファイルを記述すれば、「実現したいこと」はできますか?
24
+
25
+