質問編集履歴
1
nginxの設定を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -149,3 +149,189 @@
|
|
149
149
|
* Docker version 17.06.2-ce, build cec0b72
|
150
150
|
|
151
151
|
* docker-compose version 1.16.1, build 6d1ac21
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
##### 追記・サーバ設定
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
修正依頼ありがとうございます。nginxの設定ファイルは以下になります。
|
160
|
+
|
161
|
+
配布コンテナから特に変更はしていません。
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
/etc/nginx/nginx.conf
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
```config
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
user nginx;
|
174
|
+
|
175
|
+
worker_processes 1;
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
error_log /var/log/nginx/error.log warn;
|
180
|
+
|
181
|
+
pid /var/run/nginx.pid;
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
events {
|
188
|
+
|
189
|
+
worker_connections 1024;
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
http {
|
198
|
+
|
199
|
+
include /etc/nginx/mime.types;
|
200
|
+
|
201
|
+
default_type application/octet-stream;
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
206
|
+
|
207
|
+
'$status $body_bytes_sent "$http_referer" '
|
208
|
+
|
209
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
access_log /var/log/nginx/access.log main;
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
sendfile on;
|
218
|
+
|
219
|
+
#tcp_nopush on;
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
keepalive_timeout 65;
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
#gzip on;
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
include /etc/nginx/conf.d/*.conf;
|
232
|
+
|
233
|
+
}
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
```
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
/etc/nginx/conf.d/default.conf
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
```config
|
246
|
+
|
247
|
+
server {
|
248
|
+
|
249
|
+
listen 80;
|
250
|
+
|
251
|
+
server_name localhost;
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
#charset koi8-r;
|
256
|
+
|
257
|
+
#access_log /var/log/nginx/host.access.log main;
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
location / {
|
262
|
+
|
263
|
+
root /usr/share/nginx/html;
|
264
|
+
|
265
|
+
index index.html index.htm;
|
266
|
+
|
267
|
+
}
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
#error_page 404 /404.html;
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
# redirect server error pages to the static page /50x.html
|
276
|
+
|
277
|
+
#
|
278
|
+
|
279
|
+
error_page 500 502 503 504 /50x.html;
|
280
|
+
|
281
|
+
location = /50x.html {
|
282
|
+
|
283
|
+
root /usr/share/nginx/html;
|
284
|
+
|
285
|
+
}
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
290
|
+
|
291
|
+
#
|
292
|
+
|
293
|
+
#location ~ \.php$ {
|
294
|
+
|
295
|
+
# proxy_pass http://127.0.0.1;
|
296
|
+
|
297
|
+
#}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
302
|
+
|
303
|
+
#
|
304
|
+
|
305
|
+
#location ~ \.php$ {
|
306
|
+
|
307
|
+
# root html;
|
308
|
+
|
309
|
+
# fastcgi_pass 127.0.0.1:9000;
|
310
|
+
|
311
|
+
# fastcgi_index index.php;
|
312
|
+
|
313
|
+
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
314
|
+
|
315
|
+
# include fastcgi_params;
|
316
|
+
|
317
|
+
#}
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
# deny access to .htaccess files, if Apache's document root
|
322
|
+
|
323
|
+
# concurs with nginx's one
|
324
|
+
|
325
|
+
#
|
326
|
+
|
327
|
+
#location ~ /\.ht {
|
328
|
+
|
329
|
+
# deny all;
|
330
|
+
|
331
|
+
#}
|
332
|
+
|
333
|
+
}
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
```
|