質問編集履歴
4
修正依頼がございました。cssとファイルの階層図を載せました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -139,4 +139,18 @@
|
|
139
139
|
```ここに言語を入力
|
140
140
|
gunicorn --bind 127.0.0.1:8000 QuantumGun.wsgi -D
|
141
141
|
```
|
142
|
-
を入力しているので、Gunicornは起動していると言う認識です。
|
142
|
+
を入力しているので、Gunicornは起動していると言う認識です。
|
143
|
+
|
144
|
+
### 修正 20210206
|
145
|
+
頂いた指摘を元に、追記いたします。
|
146
|
+
axよりauxの方が分かりやすいとご指摘いただきました。必要ないかもしれませんが、念のため記載しておきます。
|
147
|
+
```Linux
|
148
|
+
$ ps aux | grep gunicorn
|
149
|
+
xxx_xxx+ 21742 0.0 0.0 119436 928 pts/0 S+ 02:47 0:00 grep --color=auto gunicorn
|
150
|
+
```
|
151
|
+
また、gunicornのプロジェクトディレクトリの場所についてもご質問いただきました。以下で回答になっているかどうか分かりませんが、載せておきます。
|
152
|
+
```Linux
|
153
|
+
$ which gunicorn
|
154
|
+
~/QuantumGun/bin/gunicorn
|
155
|
+
|
156
|
+
```
|
3
修正依頼がございました。cssとファイルの階層図を載せました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -105,7 +105,7 @@
|
|
105
105
|
|
106
106
|
server {
|
107
107
|
listen 80;
|
108
|
-
server_name
|
108
|
+
server_name xxxxxxxx;
|
109
109
|
root /usr/share/nginx/html;
|
110
110
|
|
111
111
|
# Load configuration files for the default server block.
|
2
nginx 設定修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -88,14 +88,52 @@
|
|
88
88
|
'"$http_user_agent" "$http_x_forwarded_for" "$request_body"';
|
89
89
|
|
90
90
|
access_log /var/log/nginx/access.log main;
|
91
|
-
|
91
|
+
|
92
92
|
sendfile on;
|
93
93
|
tcp_nopush on;
|
94
94
|
tcp_nodelay on;
|
95
95
|
keepalive_timeout 65;
|
96
96
|
types_hash_max_size 2048;
|
97
97
|
|
98
|
+
include /etc/nginx/mime.types;
|
99
|
+
default_type application/octet-stream;
|
100
|
+
|
101
|
+
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
102
|
+
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
103
|
+
# for more information.
|
98
|
-
|
104
|
+
include /etc/nginx/conf.d/*.conf;
|
105
|
+
|
106
|
+
server {
|
107
|
+
listen 80;
|
108
|
+
server_name 3.12.54.144;
|
109
|
+
root /usr/share/nginx/html;
|
110
|
+
|
111
|
+
# Load configuration files for the default server block.
|
112
|
+
include /etc/nginx/default.d/*.conf;
|
113
|
+
|
114
|
+
location /static {
|
115
|
+
alias /usr/share/nginx/html/static;
|
116
|
+
}
|
117
|
+
location /media {
|
118
|
+
alias /usr/share/nginx/html/media;
|
119
|
+
}
|
120
|
+
location / {
|
121
|
+
proxy_set_header Host $http_host;
|
122
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
123
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
124
|
+
|
125
|
+
proxy_pass http://127.0.0.1:8000;
|
126
|
+
}
|
127
|
+
|
128
|
+
error_page 404 /404.html;
|
129
|
+
location = /40x.html {
|
130
|
+
}
|
131
|
+
|
132
|
+
error_page 500 502 503 504 /50x.html;
|
133
|
+
location = /50x.html {
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
99
137
|
```
|
100
138
|
また、そもそもgunicornが起動していないのではと言う指摘についてですが、
|
101
139
|
```ここに言語を入力
|
1
頂いた指摘に対して回答いたしました
title
CHANGED
File without changes
|
body
CHANGED
@@ -61,4 +61,44 @@
|
|
61
61
|
これが継続できるのは teratailにいる皆様の回答のおかげです。
|
62
62
|
どうか、今回も皆様のお力をお貸しいただけないでしょうか。
|
63
63
|
|
64
|
-
どうぞよろしくお願いいたします。
|
64
|
+
どうぞよろしくお願いいたします。
|
65
|
+
|
66
|
+
### 修正
|
67
|
+
nginxの設定について書きます。
|
68
|
+
```ここに言語を入力
|
69
|
+
# For more information on configuration, see:
|
70
|
+
# * Official English Documentation: http://nginx.org/en/docs/
|
71
|
+
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
72
|
+
|
73
|
+
user nginx;
|
74
|
+
worker_processes auto;
|
75
|
+
error_log /var/log/nginx/error.log;
|
76
|
+
pid /run/nginx.pid;
|
77
|
+
|
78
|
+
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
|
79
|
+
include /usr/share/nginx/modules/*.conf;
|
80
|
+
|
81
|
+
events {
|
82
|
+
worker_connections 1024;
|
83
|
+
}
|
84
|
+
|
85
|
+
http {
|
86
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
87
|
+
'$status $body_bytes_sent "$http_referer" '
|
88
|
+
'"$http_user_agent" "$http_x_forwarded_for" "$request_body"';
|
89
|
+
|
90
|
+
access_log /var/log/nginx/access.log main;
|
91
|
+
nが
|
92
|
+
sendfile on;
|
93
|
+
tcp_nopush on;
|
94
|
+
tcp_nodelay on;
|
95
|
+
keepalive_timeout 65;
|
96
|
+
types_hash_max_size 2048;
|
97
|
+
|
98
|
+
"/etc/nginx/nginx.conf" 100L, 2823C
|
99
|
+
```
|
100
|
+
また、そもそもgunicornが起動していないのではと言う指摘についてですが、
|
101
|
+
```ここに言語を入力
|
102
|
+
gunicorn --bind 127.0.0.1:8000 QuantumGun.wsgi -D
|
103
|
+
```
|
104
|
+
を入力しているので、Gunicornは起動していると言う認識です。
|