質問編集履歴

1

追記

2020/01/10 04:28

投稿

marco
marco

スコア33

test CHANGED
File without changes
test CHANGED
@@ -229,3 +229,75 @@
229
229
  ```
230
230
 
231
231
  と書きました。
232
+
233
+
234
+
235
+ /etc/nginx/conf.d/○○○○○confの内容は
236
+
237
+ ```
238
+
239
+
240
+
241
+ error_log /var/www/rails/○○○○/log/nginx.error.log;
242
+
243
+ access_log /var/www/rails/○○○○/log/nginx.access.log;
244
+
245
+ # max body size
246
+
247
+
248
+
249
+ upstream app_server {
250
+
251
+ # for UNIX domain socket setups
252
+
253
+ server unix:/var/www/rails/○○○○/tmp/sockets/.unicorn.sock fail_timeout=0; #自分のアプリケーション名に変更
254
+
255
+ }
256
+
257
+ server {
258
+
259
+ listen 80;
260
+
261
+ server_name 13.112.20.119 archibook.cloud;
262
+
263
+ # nginx so increasing this is generally safe...
264
+
265
+ keepalive_timeout 5;
266
+
267
+ # path for static files
268
+
269
+ root /var/www/rails/○○○○/public;
270
+
271
+ # page cache loading
272
+
273
+ try_files $uri/index.html $uri.html $uri @app;
274
+
275
+ location @app {
276
+
277
+ # HTTP headers
278
+
279
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
280
+
281
+ proxy_set_header Host $http_host;
282
+
283
+ proxy_redirect off;
284
+
285
+ proxy_pass http://app_server;
286
+
287
+ }
288
+
289
+ # Rails error pages
290
+
291
+ error_page 500 502 503 504 /500.html;
292
+
293
+ location = /500.html {
294
+
295
+ root /var/www/rails/○○○○/public;
296
+
297
+ }
298
+
299
+ }
300
+
301
+
302
+
303
+ ```