teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

回答者の解決策を試した結果を追加

2018/09/22 03:26

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -209,4 +209,15 @@
209
209
  [Fri Sep 21 23:54:52.751439 2018] [php7:error] [pid 7024] [client 182.171.170.190:62765] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
210
210
  [Fri Sep 21 23:54:52.891017 2018] [php7:warn] [pid 7023] [client 182.171.170.190:62766] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
211
211
  "error_log" 502L, 97475C
212
+ ```
213
+
214
+ sudo chown -R apache:apache /var/www/html/testlaravelを試した場合のエラーログ
215
+ ```sh
216
+ [Sat Sep 22 12:22:04.132316 2018] [php7:warn] [pid 1360] [client 182.171.170.190:63302] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
217
+ [Sat Sep 22 12:22:04.132370 2018] [php7:error] [pid 1360] [client 182.171.170.190:63302] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
218
+ [Sat Sep 22 12:22:04.347741 2018] [php7:warn] [pid 1361] [client 182.171.170.190:63303] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
219
+ [Sat Sep 22 12:22:04.347810 2018] [php7:error] [pid 1361] [client 182.171.170.190:63303] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
220
+ [Sat Sep 22 12:22:04.481511 2018] [php7:warn] [pid 1362] [client 182.171.170.190:63304] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
221
+ [Sat Sep 22 12:22:04.481572 2018] [php7:error] [pid 1362] [client 182.171.170.190:63304] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
222
+
212
223
  ```

3

資料修正

2018/09/22 03:26

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -165,6 +165,7 @@
165
165
  ----r-x-wx 1 root root 914 Sep 4 22:12 web.config
166
166
  ```
167
167
  /var/www/html/testlaravel/public/.htaccess
168
+ (今回.htaccessは別名に変えて無効化していました。)
168
169
 
169
170
  ```sh
170
171
  <IfModule mod_rewrite.c>
@@ -192,23 +193,20 @@
192
193
 
193
194
  /var/log/httpd/error_log
194
195
  ```sh
195
- [Fri Sep 21 21:19:38.071202 2018] [autoindex:error] [pid 7102] [client 196.52.43.84:58378] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
196
- [Fri Sep 21 21:25:27.282629 2018] [autoindex:error] [pid 7021] [client 201.13.92.142:56390] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
197
- [Fri Sep 21 21:31:32.218697 2018] [autoindex:error] [pid 7022] [client 91.231.40.197:40209] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
198
- [Fri Sep 21 22:13:22.550930 2018] [autoindex:error] [pid 7024] [client 143.137.150.6:59975] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
199
- [Fri Sep 21 22:44:46.823945 2018] [autoindex:error] [pid 7020] [client 182.171.170.190:52283] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
200
- [Fri Sep 21 22:45:02.970961 2018] [php7:warn] [pid 7154] [client 182.171.170.190:52309] PHP Warning: require_once(/var/www/html/testlaravel/public/index.php): failed to open stream: Permission denied in /var/www/html/testlaravel/server.php on line 21, referer: http://ドメイン名/testlaravel/
201
- [Fri Sep 21 22:45:02.971027 2018] [php7:error] [pid 7154] [client 182.171.170.190:52309] PHP Fatal error: require_once(): Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/testlaravel/server.php on line 21, referer: http://ドメイン名/testlaravel/
202
- [Fri Sep 21 22:45:10.273226 2018] [php7:error] [pid 7155] [client 182.171.170.190:52327] PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /var/www/html/testlaravel/bootstrap/app.php:14\nStack trace:\n#0 {main}\n thrown in /var/www/html/testlaravel/bootstrap/app.php on line 14, referer: http://ドメイン名/testlaravel/bootstrap/
203
- [Fri Sep 21 23:21:40.714683 2018] [core:crit] [pid 7022] (13)Permission denied: [client 182.171.170.190:62714] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
204
- [Fri Sep 21 23:21:51.812937 2018] [core:crit] [pid 7021] (13)Permission denied: [client 182.171.170.190:62715] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
205
- [Fri Sep 21 23:22:00.999988 2018] [core:crit] [pid 7154] (13)Permission denied: [client 182.171.170.190:62716] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
206
- [Fri Sep 21 23:22:28.391049 2018] [core:crit] [pid 7024] (13)Permission denied: [client 182.171.170.190:62717] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
207
- [Fri Sep 21 23:23:45.622874 2018] [core:crit] [pid 7023] (13)Permission denied: [client 182.171.170.190:62718] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
208
- [Fri Sep 21 23:23:46.369612 2018] [core:crit] [pid 7023] (13)Permission denied: [client 182.171.170.190:62718] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
209
- [Fri Sep 21 23:24:07.334536 2018] [core:crit] [pid 7153] (13)Permission denied: [client 182.171.170.190:62719] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
210
- [Fri Sep 21 23:24:10.422601 2018] [core:crit] [pid 7153] (13)Permission denied: [client 182.171.170.190:62719] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
211
- [Fri Sep 21 23:25:56.050417 2018] [php7:warn] [pid 7155] [client 182.171.170.190:62721] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: http://ドメイン名/testlaravel/
212
- [Fri Sep 21 23:25:56.050504 2018] [php7:error] [pid 7155] [client 182.171.170.190:62721] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: http://ドメイン名/testlaravel/
213
- "error_log" 446L, 85463C
196
+ [Fri Sep 21 23:25:56.050417 2018] [php7:warn] [pid 7155] [client 182.171.170.190:62721] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: http://ドメイン名.com/testlaravel/
197
+ [Fri Sep 21 23:25:56.050504 2018] [php7:error] [pid 7155] [client 182.171.170.190:62721] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: http://ドメイン名.com/testlaravel/
198
+ [Fri Sep 21 23:54:51.166902 2018] [php7:warn] [pid 7102] [client 182.171.170.190:62760] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
199
+ [Fri Sep 21 23:54:51.167001 2018] [php7:error] [pid 7102] [client 182.171.170.190:62760] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
200
+ [Fri Sep 21 23:54:51.665052 2018] [php7:warn] [pid 7020] [client 182.171.170.190:62761] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
201
+ [Fri Sep 21 23:54:51.665149 2018] [php7:error] [pid 7020] [client 182.171.170.190:62761] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
202
+ [Fri Sep 21 23:54:52.179743 2018] [php7:warn] [pid 7022] [client 182.171.170.190:62762] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
203
+ [Fri Sep 21 23:54:52.179834 2018] [php7:error] [pid 7022] [client 182.171.170.190:62762] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
204
+ [Fri Sep 21 23:54:52.337944 2018] [php7:warn] [pid 7021] [client 182.171.170.190:62763] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
205
+ [Fri Sep 21 23:54:52.338010 2018] [php7:error] [pid 7021] [client 182.171.170.190:62763] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
206
+ [Fri Sep 21 23:54:52.606840 2018] [php7:warn] [pid 7154] [client 182.171.170.190:62764] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
207
+ [Fri Sep 21 23:54:52.606919 2018] [php7:error] [pid 7154] [client 182.171.170.190:62764] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
208
+ [Fri Sep 21 23:54:52.751345 2018] [php7:warn] [pid 7024] [client 182.171.170.190:62765] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
209
+ [Fri Sep 21 23:54:52.751439 2018] [php7:error] [pid 7024] [client 182.171.170.190:62765] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
210
+ [Fri Sep 21 23:54:52.891017 2018] [php7:warn] [pid 7023] [client 182.171.170.190:62766] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
211
+ "error_log" 502L, 97475C
214
212
  ```

2

資料追加

2018/09/21 15:03

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -21,6 +21,8 @@
21
21
 
22
22
  ```
23
23
 
24
+ /etc/httpd/conf/httpd.conf
25
+
24
26
  ```sh
25
27
 
26
28
 
@@ -186,4 +188,27 @@
186
188
  RewriteCond %{REQUEST_FILENAME} !-f
187
189
  RewriteRule ^ index.php [L]
188
190
  </IfModule>
191
+ ```
192
+
193
+ /var/log/httpd/error_log
194
+ ```sh
195
+ [Fri Sep 21 21:19:38.071202 2018] [autoindex:error] [pid 7102] [client 196.52.43.84:58378] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
196
+ [Fri Sep 21 21:25:27.282629 2018] [autoindex:error] [pid 7021] [client 201.13.92.142:56390] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
197
+ [Fri Sep 21 21:31:32.218697 2018] [autoindex:error] [pid 7022] [client 91.231.40.197:40209] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
198
+ [Fri Sep 21 22:13:22.550930 2018] [autoindex:error] [pid 7024] [client 143.137.150.6:59975] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
199
+ [Fri Sep 21 22:44:46.823945 2018] [autoindex:error] [pid 7020] [client 182.171.170.190:52283] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
200
+ [Fri Sep 21 22:45:02.970961 2018] [php7:warn] [pid 7154] [client 182.171.170.190:52309] PHP Warning: require_once(/var/www/html/testlaravel/public/index.php): failed to open stream: Permission denied in /var/www/html/testlaravel/server.php on line 21, referer: http://ドメイン名/testlaravel/
201
+ [Fri Sep 21 22:45:02.971027 2018] [php7:error] [pid 7154] [client 182.171.170.190:52309] PHP Fatal error: require_once(): Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/testlaravel/server.php on line 21, referer: http://ドメイン名/testlaravel/
202
+ [Fri Sep 21 22:45:10.273226 2018] [php7:error] [pid 7155] [client 182.171.170.190:52327] PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /var/www/html/testlaravel/bootstrap/app.php:14\nStack trace:\n#0 {main}\n thrown in /var/www/html/testlaravel/bootstrap/app.php on line 14, referer: http://ドメイン名/testlaravel/bootstrap/
203
+ [Fri Sep 21 23:21:40.714683 2018] [core:crit] [pid 7022] (13)Permission denied: [client 182.171.170.190:62714] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
204
+ [Fri Sep 21 23:21:51.812937 2018] [core:crit] [pid 7021] (13)Permission denied: [client 182.171.170.190:62715] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
205
+ [Fri Sep 21 23:22:00.999988 2018] [core:crit] [pid 7154] (13)Permission denied: [client 182.171.170.190:62716] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
206
+ [Fri Sep 21 23:22:28.391049 2018] [core:crit] [pid 7024] (13)Permission denied: [client 182.171.170.190:62717] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
207
+ [Fri Sep 21 23:23:45.622874 2018] [core:crit] [pid 7023] (13)Permission denied: [client 182.171.170.190:62718] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
208
+ [Fri Sep 21 23:23:46.369612 2018] [core:crit] [pid 7023] (13)Permission denied: [client 182.171.170.190:62718] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
209
+ [Fri Sep 21 23:24:07.334536 2018] [core:crit] [pid 7153] (13)Permission denied: [client 182.171.170.190:62719] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
210
+ [Fri Sep 21 23:24:10.422601 2018] [core:crit] [pid 7153] (13)Permission denied: [client 182.171.170.190:62719] AH00529: /var/www/html/testlaravel/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testlaravel/public/' is executable
211
+ [Fri Sep 21 23:25:56.050417 2018] [php7:warn] [pid 7155] [client 182.171.170.190:62721] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0, referer: http://ドメイン名/testlaravel/
212
+ [Fri Sep 21 23:25:56.050504 2018] [php7:error] [pid 7155] [client 182.171.170.190:62721] PHP Fatal error: Unknown: Failed opening required '/var/www/html/testlaravel/public/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0, referer: http://ドメイン名/testlaravel/
213
+ "error_log" 446L, 85463C
189
214
  ```

1

タイトル修正

2018/09/21 14:35

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- apacheで500エラーが解決できな
1
+ apacheで500エラーが解決できな
body CHANGED
File without changes