質問編集履歴
4
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,6 +43,10 @@
|
|
43
43
|
#
|
44
44
|
environment ENV.fetch("RAILS_ENV") { "development" }
|
45
45
|
|
46
|
+
app_root = File.expand_path("../..", __FILE__)
|
47
|
+
bind "unix://#{app_root}/tmp/sockets/puma.sock"
|
48
|
+
|
49
|
+
|
46
50
|
# Specifies the number of `workers` to boot in clustered mode.
|
47
51
|
# Workers are forked webserver processes. If using threads and workers together
|
48
52
|
# the concurrency of the application would be max `threads` * `workers`.
|
@@ -69,4 +73,64 @@
|
|
69
73
|
* connect to 127.0.0.1 port 3000 failed: 接続を拒否されました
|
70
74
|
* Failed to connect to localhost port 3000: 接続を拒否されました
|
71
75
|
* Closing connection 0
|
72
|
-
curl: (7) Failed to connect to localhost port 3000: 接続を拒否されました
|
76
|
+
curl: (7) Failed to connect to localhost port 3000: 接続を拒否されました
|
77
|
+
###nginx.conf
|
78
|
+
```
|
79
|
+
user appusr;
|
80
|
+
worker_processes 1;
|
81
|
+
|
82
|
+
error_log /var/log/nginx/error.log;
|
83
|
+
pid /var/run/nginx.pid;
|
84
|
+
|
85
|
+
events {
|
86
|
+
worker_connections 1024;
|
87
|
+
}
|
88
|
+
|
89
|
+
http {
|
90
|
+
upstream backend {
|
91
|
+
server unix:/home/kkawahara/workspace/working/webex/tmp/sockets/puma.sock max_fails=3 fail_timeout=10s;
|
92
|
+
keepalive 15;
|
93
|
+
}
|
94
|
+
|
95
|
+
include /etc/nginx/mime.types;
|
96
|
+
default_type application/octet-stream;
|
97
|
+
|
98
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
99
|
+
'$status $body_bytes_sent "$http_referer" '
|
100
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
101
|
+
|
102
|
+
access_log /var/log/nginx/access.log main;
|
103
|
+
sendfile on;
|
104
|
+
#tcp_nopush on;
|
105
|
+
|
106
|
+
#keepalive_timeout 0;
|
107
|
+
keepalive_timeout 65;
|
108
|
+
|
109
|
+
include /etc/nginx/conf.d/*.conf;
|
110
|
+
|
111
|
+
index index.html index.htm;
|
112
|
+
|
113
|
+
server {
|
114
|
+
listen 80;
|
115
|
+
server_name localhost;
|
116
|
+
root /usr/share/nginx/html;
|
117
|
+
|
118
|
+
location / {
|
119
|
+
}
|
120
|
+
error_page 404 /404.html;
|
121
|
+
location = /40x.html {
|
122
|
+
}
|
123
|
+
|
124
|
+
error_page 500 502 503 504 /50x.html;
|
125
|
+
location = /50x.html {
|
126
|
+
}
|
127
|
+
|
128
|
+
location ~ .php$ {
|
129
|
+
proxy_pass http://backend;
|
130
|
+
}
|
131
|
+
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
```
|
3
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -60,4 +60,13 @@
|
|
60
60
|
|
61
61
|
# Allow puma to be restarted by `rails restart` command.
|
62
62
|
plugin :tmp_restart
|
63
|
-
```
|
63
|
+
```
|
64
|
+
|
65
|
+
試したこと
|
66
|
+
$ sudo curl -v http://localhost:3000/
|
67
|
+
* Trying 127.0.0.1...
|
68
|
+
* TCP_NODELAY set
|
69
|
+
* connect to 127.0.0.1 port 3000 failed: 接続を拒否されました
|
70
|
+
* Failed to connect to localhost port 3000: 接続を拒否されました
|
71
|
+
* Closing connection 0
|
72
|
+
curl: (7) Failed to connect to localhost port 3000: 接続を拒否されました
|
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,9 +6,12 @@
|
|
6
6
|
・求める成果
|
7
7
|
Railsのviewを表示させたい
|
8
8
|
・実行できないと思われる原因
|
9
|
-
nginxと接続されていないようでrailsの起動後に
|
9
|
+
nginxと接続されていないようでrailsの起動後にブラウザでwex01.cloud24.jp:3000と打っても応答がなくタイムアウトします。
|
10
|
+
rails側は何もログが出ていないです。
|
11
|
+
wex01.cloud24.jpだけならnginxの"Welcome nginx..."indexページが表示されます。
|
10
12
|
|
11
13
|
|
14
|
+
|
12
15
|
・開発環境
|
13
16
|
ubuntu:18.04
|
14
17
|
ruby:2.5.1
|
1
情報の追記
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
Rails+Puma+Nginxの
|
1
|
+
Rails+Puma+Nginxの接続の仕方がわからない
|
body
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
これをしないとrailsのviewを表示できないので、お力を貸して頂きたいです。
|
4
4
|
当方、初心者でして必要事項の記入漏れや受け答えがうまくできないかもしれないですけどよろしくお願い致します。
|
5
5
|
|
6
|
+
・求める成果
|
7
|
+
Railsのviewを表示させたい
|
8
|
+
・実行できないと思われる原因
|
9
|
+
nginxと接続されていないようでrailsの起動後にURLを打っても反応がありません
|
10
|
+
|
11
|
+
|
6
12
|
・開発環境
|
7
13
|
ubuntu:18.04
|
8
14
|
ruby:2.5.1
|