質問編集履歴

1

追記

2015/12/09 10:39

投稿

tixure55
tixure55

スコア400

test CHANGED
File without changes
test CHANGED
@@ -81,3 +81,95 @@
81
81
 
82
82
 
83
83
  パーミッション以外の設定を見直す必要があるのでしょうか?
84
+
85
+
86
+
87
+ 追記:
88
+
89
+ 回答ありがとうございます。
90
+
91
+
92
+
93
+ 下記confでも同一状態になるので、locationディレクティブが原因ではないようです。
94
+
95
+ ```PHP
96
+
97
+ user nginx;
98
+
99
+ worker_processes 1;
100
+
101
+
102
+
103
+ error_log /var/log/nginx/error.log warn;
104
+
105
+ pid /var/run/nginx.pid;
106
+
107
+
108
+
109
+
110
+
111
+ events {
112
+
113
+ worker_connections 1024;
114
+
115
+ }
116
+
117
+
118
+
119
+
120
+
121
+ http {
122
+
123
+ server {
124
+
125
+ listen 8001;
126
+
127
+ server_name localhost;
128
+
129
+ root /var/www/ruby;
130
+
131
+ }
132
+
133
+
134
+
135
+
136
+
137
+ include /etc/nginx/mime.types;
138
+
139
+ default_type application/octet-stream;
140
+
141
+
142
+
143
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
144
+
145
+ '$status $body_bytes_sent "$http_referer" '
146
+
147
+ '"$http_user_agent" "$http_x_forwarded_for"';
148
+
149
+ access_log /var/log/nginx/access.log main;
150
+
151
+ sendfile on;
152
+
153
+ #tcp_nopush on;
154
+
155
+ keepalive_timeout 65;
156
+
157
+
158
+
159
+ #gzip on;
160
+
161
+ }
162
+
163
+
164
+
165
+ ```
166
+
167
+ /var/log/nginx/error.log ↓
168
+
169
+ ```PHP
170
+
171
+ 2015/12/09 19:36:12 [error] 9643#0: *1 directory index of "/var/www/ruby/" is forbidden, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost:8001"
172
+
173
+
174
+
175
+ ```