質問編集履歴
3
修正後のエラー内容追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -61,3 +61,47 @@
|
|
61
61
|
###エラー内容
|
62
62
|
|
63
63
|
2018/10/31 15:20:11 [error] 16941#0: *1 open() "/home/ユーザ名/workspace/cookie" failed (2: No such file or directory), client: 210.146.152.152, server: localhost, request: "GET /test HTTP/1.1", host: "ドメイン名"
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
###修正
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
#/etc/nginx/conf.d/default.conf
|
72
|
+
|
73
|
+
server {
|
74
|
+
|
75
|
+
listen 80;
|
76
|
+
|
77
|
+
server_name localhost;
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
location / {
|
82
|
+
|
83
|
+
root /usr/share/nginx/html;
|
84
|
+
|
85
|
+
index index.html;
|
86
|
+
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
#下記を修正
|
92
|
+
|
93
|
+
location /workspace {
|
94
|
+
|
95
|
+
root /home/ユーザ名;
|
96
|
+
|
97
|
+
index index.html;
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
```
|
104
|
+
|
105
|
+
上記のように修正すると
|
106
|
+
|
107
|
+
403 Forbiddenエラーがでました。
|
2
エラー内容追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
location /test {
|
46
46
|
|
47
|
-
root /home/ユーザ名/;
|
47
|
+
root /home/ユーザ名/workspace;
|
48
48
|
|
49
49
|
index index.html;
|
50
50
|
|
@@ -55,3 +55,9 @@
|
|
55
55
|
|
56
56
|
|
57
57
|
```
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
###エラー内容
|
62
|
+
|
63
|
+
2018/10/31 15:20:11 [error] 16941#0: *1 open() "/home/ユーザ名/workspace/cookie" failed (2: No such file or directory), client: 210.146.152.152, server: localhost, request: "GET /test HTTP/1.1", host: "ドメイン名"
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,6 +9,12 @@
|
|
9
9
|
しかし、nginxの設定をどうすれてばよいかわかりません。
|
10
10
|
|
11
11
|
下記のように追記してみたのですがfile not foundと返ってきます。
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
参照したいindex.htmlファイルは
|
16
|
+
|
17
|
+
/home/ユーザ名/workspace/index.html
|
12
18
|
|
13
19
|
|
14
20
|
|