質問編集履歴

4

2021/03/23 02:41

投稿

pay_561
pay_561

スコア26

test CHANGED
File without changes
test CHANGED
@@ -238,8 +238,8 @@
238
238
 
239
239
  2021/03/23 02:21:53 [crit] 3746#0: *1 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html", host: "☓.☓☓☓.☓☓.☓☓☓", referrer: "http://☓.☓☓☓.☓☓.☓☓☓/"
240
240
 
241
- 2021/03/23 02:22:25 [crit] 3746#0: *7 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: 139.59.69.194, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.0", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/"
242
-
243
- 2021/03/23 02:22:25 [crit] 3746#0: *7 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: 139.59.69.194, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.0", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html"
244
-
245
- ```
241
+ 2021/03/23 02:22:25 [crit] 3746#0: *7 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: .☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.0", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/"
242
+
243
+ 2021/03/23 02:22:25 [crit] 3746#0: *7 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: .☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.0", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html"
244
+
245
+ ```

3

追記

2021/03/23 02:41

投稿

pay_561
pay_561

スコア26

test CHANGED
File without changes
test CHANGED
@@ -211,3 +211,35 @@
211
211
  && bundle install
212
212
 
213
213
  ```
214
+
215
+ /var/log/nginx/error.log
216
+
217
+ ##追記
218
+
219
+ ```ここに言語を入力
220
+
221
+ $sudo tail /var/log/nginx/error.log
222
+
223
+
224
+
225
+ 2021/03/23 02:21:26 [crit] 3695#0: *13 connect() to unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.1", upstream: "http://unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/", host: "☓.☓☓☓.☓☓.☓☓☓"
226
+
227
+ 2021/03/23 02:21:26 [crit] 3695#0: *13 connect() to unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.1", upstream: "http://unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html", host: "☓.☓☓☓.☓☓.☓☓☓"
228
+
229
+ 2021/03/23 02:21:26 [crit] 3695#0: *13 connect() to unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/favicon.ico", host: "☓.☓☓☓.☓☓.☓☓☓", referrer: "http://☓.☓☓☓.☓☓.☓☓☓/"
230
+
231
+ 2021/03/23 02:21:26 [crit] 3695#0: *13 connect() to unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:/home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html", host: "☓.☓☓☓.☓☓.☓☓☓", referrer: "http://☓.☓☓☓.☓☓.☓☓☓/"
232
+
233
+ 2021/03/23 02:21:52 [crit] 3746#0: *1 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.1", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/", host: "☓.☓☓☓.☓☓.☓☓☓"
234
+
235
+ 2021/03/23 02:21:52 [crit] 3746#0: *1 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.1", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html", host: "☓.☓☓☓.☓☓.☓☓☓"
236
+
237
+ 2021/03/23 02:21:53 [crit] 3746#0: *1 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/favicon.ico", host: "☓.☓☓☓.☓☓.☓☓☓", referrer: "http://☓.☓☓☓.☓☓.☓☓☓/"
238
+
239
+ 2021/03/23 02:21:53 [crit] 3746#0: *1 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: ☓☓☓.☓☓☓.☓☓.☓☓☓, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html", host: "☓.☓☓☓.☓☓.☓☓☓", referrer: "http://☓.☓☓☓.☓☓.☓☓☓/"
240
+
241
+ 2021/03/23 02:22:25 [crit] 3746#0: *7 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: 139.59.69.194, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.0", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/"
242
+
243
+ 2021/03/23 02:22:25 [crit] 3746#0: *7 connect() to unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: 139.59.69.194, server: ☓.☓☓☓.☓☓.☓☓☓, request: "GET / HTTP/1.0", upstream: "http://unix:home/ec2-user/var/www/game-bug-app/src/tmp/unicorn.sock:/500.html"
244
+
245
+ ```

2

誤字修正

2021/03/23 02:40

投稿

pay_561
pay_561

スコア26

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var/www/game-bug-app/src/tmp/unicorn.sockの中身を確認しようとしましたが権限がなく開けませんでした。
17
+ var/www/game-bug-app/src/tmp/unicorn.sockの中身を確認しようとしましたが権限がなく開けませんでした。
18
18
 
19
19
 
20
20
 

1

修正

2021/03/23 02:14

投稿

pay_561
pay_561

スコア26

test CHANGED
File without changes
test CHANGED
@@ -123,3 +123,91 @@
123
123
  }
124
124
 
125
125
  ```
126
+
127
+
128
+
129
+ ##Docker
130
+
131
+ dockerはローカル環境で使用していました、本番環境では使用してないですが一応載っけておきます。
132
+
133
+
134
+
135
+ **docker-compose.yml**
136
+
137
+ ```ここに言語を入力
138
+
139
+ version: "3"
140
+
141
+ services:
142
+
143
+ db:
144
+
145
+ image: mysql:8.0
146
+
147
+ cap_add:
148
+
149
+ - SYS_NICE
150
+
151
+ command: --default-authentication-plugin=mysql_native_password
152
+
153
+ volumes:
154
+
155
+ - ./src/db/mysql_data:/var/lib/mysql
156
+
157
+ environment:
158
+
159
+ MYSQL_ROOT_PASSWORD: password
160
+
161
+ web:
162
+
163
+ build: .
164
+
165
+ command: bundle exec rails s -p 3000 -b '0.0.0.0'
166
+
167
+ volumes:
168
+
169
+ - ./src:/app
170
+
171
+ ports:
172
+
173
+ - "3000:3000"
174
+
175
+ environment:
176
+
177
+ RAILS_ENV: development
178
+
179
+ depends_on:
180
+
181
+ - db
182
+
183
+ ```
184
+
185
+ **Dockerfile**
186
+
187
+ ```ここに言語を入力
188
+
189
+ FROM ruby:2.7
190
+
191
+
192
+
193
+ ENV RAILS_ENV=production
194
+
195
+
196
+
197
+ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
198
+
199
+ && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
200
+
201
+ && apt-get update -qq \
202
+
203
+ && apt-get install -y nodejs yarn
204
+
205
+ WORKDIR /app
206
+
207
+ COPY ./src /app
208
+
209
+ RUN bundle config --local set path 'vendor/bundle' \
210
+
211
+ && bundle install
212
+
213
+ ```