質問編集履歴
2
再修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -90,4 +90,60 @@
|
|
90
90
|
|
91
91
|
}
|
92
92
|
|
93
|
+
```
|
94
|
+
|
95
|
+
更に修正版
|
96
|
+
```ここに言語を入力
|
97
|
+
|
98
|
+
user nginx;
|
99
|
+
worker_processes 1;
|
100
|
+
|
101
|
+
error_log /var/log/nginx/error.log warn;
|
102
|
+
pid /var/run/nginx.pid;
|
103
|
+
|
104
|
+
|
105
|
+
events {
|
106
|
+
worker_connections 1024;
|
107
|
+
}
|
108
|
+
|
109
|
+
|
110
|
+
http {
|
111
|
+
include /etc/nginx/mime.types;
|
112
|
+
default_type application/octet-stream;
|
113
|
+
|
114
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
115
|
+
'$status $body_bytes_sent "$http_referer" '
|
116
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
117
|
+
|
118
|
+
access_log /var/log/nginx/access.log main;
|
119
|
+
|
120
|
+
sendfile on;
|
121
|
+
#tcp_nopush on;
|
122
|
+
|
123
|
+
keepalive_timeout 65;
|
124
|
+
|
125
|
+
#gzip on;
|
126
|
+
|
127
|
+
include /etc/nginx/conf.d/*.conf;
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
}
|
133
|
+
|
134
|
+
stream {
|
135
|
+
upstream backend {
|
136
|
+
server 127.0.0.1:9090;
|
137
|
+
}
|
138
|
+
|
139
|
+
server {
|
140
|
+
listen 443 ssl;
|
141
|
+
ssl_certificate /root/SSL/server.crt;
|
142
|
+
ssl_certificate_key /root/SSL/XXXX.com.2017.key;
|
143
|
+
proxy_connect_timeout 10s;
|
144
|
+
proxy_timeout 10s;
|
145
|
+
proxy_pass backend;
|
146
|
+
}
|
147
|
+
|
148
|
+
}
|
93
149
|
```
|
1
コード修正版追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,4 +29,65 @@
|
|
29
29
|
}
|
30
30
|
```
|
31
31
|
多少は予想していましたが、やはり動かず、基本的なところがわかっていないのですが、
|
32
|
-
どのようにすれば良いのか教えて頂きたくよろしくお願いします。
|
32
|
+
どのようにすれば良いのか教えて頂きたくよろしくお願いします。
|
33
|
+
(追記)
|
34
|
+
|
35
|
+
編集後、設定は下記の通りとなっています。
|
36
|
+
```ここに言語を入力
|
37
|
+
user nginx;
|
38
|
+
worker_processes 1;
|
39
|
+
|
40
|
+
error_log /var/log/nginx/error.log warn;
|
41
|
+
pid /var/run/nginx.pid;
|
42
|
+
|
43
|
+
|
44
|
+
events {
|
45
|
+
worker_connections 1024;
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
http {
|
50
|
+
include /etc/nginx/mime.types;
|
51
|
+
default_type application/octet-stream;
|
52
|
+
|
53
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
54
|
+
'$status $body_bytes_sent "$http_referer" '
|
55
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
56
|
+
|
57
|
+
access_log /var/log/nginx/access.log main;
|
58
|
+
|
59
|
+
sendfile on;
|
60
|
+
#tcp_nopush on;
|
61
|
+
|
62
|
+
keepalive_timeout 65;
|
63
|
+
|
64
|
+
#gzip on;
|
65
|
+
|
66
|
+
include /etc/nginx/conf.d/*.conf;
|
67
|
+
|
68
|
+
|
69
|
+
stream {
|
70
|
+
upstream backend {
|
71
|
+
server 127.0.0.1:9090;
|
72
|
+
}
|
73
|
+
|
74
|
+
server {
|
75
|
+
listen 443 ssl;
|
76
|
+
ssl_certificate /root/SSL/server.crt;
|
77
|
+
ssl_certificate_key /root/SSL/XXXXX.com.2017.key;
|
78
|
+
proxy_connect_timeout 10s;
|
79
|
+
proxy_timeout 10s;
|
80
|
+
|
81
|
+
|
82
|
+
location / {
|
83
|
+
proxy_pass backend;
|
84
|
+
proxy_http_version 1.1;
|
85
|
+
proxy_set_header Upgrade $http_upgrade;
|
86
|
+
proxy_set_header Connection "upgrade";
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
```
|