Laravelでアプリを作成しています。192.168.33.10のルートにアクセスすると画面は表示されるのですが、error_logに以下のエラーが出力されます。表示されたHTMLからform.submit()を仕込んであるボタンを押すと500エラーになってしまいます。
Apache
1[Thu Jan 28 14:24:42.053075 2021] [core:error] [pid 5869] [client 192.168.33.1:57109] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://192.168.33.10/
上記の言うとおりにhttpd.confにLogLevel debugを追加するとapacheを立ち上げた時点でいかが出力されます。
Apache
1[Thu Jan 28 14:50:19.772698 2021] [suexec:notice] [pid 5992] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) 2AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message 3[Thu Jan 28 14:50:19.793878 2021] [slotmem_shm:debug] [pid 5992] mod_slotmem_shm.c(448): AH02301: attach looking for /run/httpd/slotmem-shm-mod_heartmonitor.shm 4[Thu Jan 28 14:50:19.793902 2021] [lbmethod_heartbeat:notice] [pid 5992] AH02282: No slotmem from mod_heartmonitor 5[Thu Jan 28 14:50:19.818106 2021] [mpm_prefork:notice] [pid 5992] AH00163: Apache/2.4.6 (CentOS) PHP/8.0.1 configured -- resuming normal operations 6[Thu Jan 28 14:50:19.818131 2021] [mpm_prefork:info] [pid 5992] AH00164: Server built: Nov 16 2020 16:18:20 7[Thu Jan 28 14:50:19.818140 2021] [core:notice] [pid 5992] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' 8[Thu Jan 28 14:50:19.818151 2021] [mpm_prefork:debug] [pid 5992] prefork.c(1005): AH00165: Accept mutex: sysvsem (default: sysvsem) 9[Thu Jan 28 14:50:19.822871 2021] [proxy:debug] [pid 5995] proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared 10[Thu Jan 28 14:50:19.822918 2021] [proxy:debug] [pid 5995] proxy_util.c(1888): AH00927: initializing worker proxy:reverse local 11[Thu Jan 28 14:50:19.822935 2021] [proxy:debug] [pid 5995] proxy_util.c(1939): AH00931: initialized single connection worker in child 5995 for (*) 12同じのがインクリメントされて続くchild 5996 for (*)
つぎに192.168.33.10にアクセスするといかが出力されました。
Apache
1[Thu Jan 28 14:53:53.352236 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization resu 2lt of Require all granted: granted 3[Thu Jan 28 14:53:53.352266 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of <RequireAny>: granted 4[Thu Jan 28 14:53:53.352341 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of Require all granted: granted 5[Thu Jan 28 14:53:53.352345 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of <RequireAny>: granted 6[Thu Jan 28 14:53:53.352384 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of Require all granted: granted 7[Thu Jan 28 14:53:53.352396 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of <RequireAny>: granted 8[Thu Jan 28 14:53:53.551983 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/ 9[Thu Jan 28 14:53:53.552003 2021] [authz_core:debug] [pid 5995] mod_authz_core.c(809): [client 192.168.33.1:58130] AH01626: authorization result of <RequireAny>: granted, referer: http://192.168.33.10/ 10[Thu Jan 28 14:53:53.561970 2021] [authz_core:debug] [pid 5996] mod_authz_core.c(809): [client 192.168.33.1:58129] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/ 11[Thu Jan 28 14:53:53.561999 2021] [authz_core:debug] [pid 5996] mod_authz_core.c(809): [client 192.168.33.1:58129] AH01626: authorization result of <RequireAny>: granted, referer: http://192.168.33.10/ 12[Thu Jan 28 14:53:53.563937 2021] [authz_core:debug] [pid 5997] mod_authz_core.c(809): [client 192.168.33.1:58133] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/ 13[Thu Jan 28 14:53:53.563964 2021] [authz_core:debug] [pid 5997] mod_authz_core.c(809): [client 192.168.33.1:58133] AH01626: authorization result of <RequireAny>: granted, referer: http://192.168.33.10/ 14[Thu Jan 28 14:53:53.565752 2021] [authz_core:debug] [pid 5998] mod_authz_core.c(809): [client 192.168.33.1:58134] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/ 15[Thu Jan 28 14:53:53.565779 2021] [authz_core:debug] [pid 5998] mod_authz_core.c(809): [client 192.168.33.1:58134] AH01626: authorization result of <RequireAny>: granted, referer: http://192.168.33.10/ 16[Thu Jan 28 14:53:53.567919 2021] [authz_core:debug] [pid 5994] mod_authz_core.c(809): [client 192.168.33.1:58135] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/ 17[Thu Jan 28 14:53:53.567948 2021] [authz_core:debug] [pid 5994] mod_authz_core.c(809): [client 192.168.33.1:58135] AH01626: authorization result of <RequireAny>: granted, referer: http://192.168.33.10/ 18[Thu Jan 28 14:53:53.647657 2021] [authz_core:debug] [pid 5994] mod_authz_core.c(809): [client 192.168.33.1:58135] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/ 19[Thu Jan 28 14:53:53.647674 2021] [authz_core:debug] [pid 5994] mod_authz_core.c(809): [client 192.168.33.1:58135] AH01626: authorization result of <RequireAny>: granted, referer: http://192.168.33.10/ 20[Thu Jan 28 14:53:53.663357 2021] [authz_core:debug] [pid 5994] mod_authz_core.c(809): [client 192.168.33.1:58135] AH01626: authorization result of Require all granted: granted, referer: http://192.168.33.10/
exceeded the limitのエラーで調べてみると以下の様な設定が出てきますが、.htaccessですでに設定されてるので問題ないかと思います。
http://blog.livedoor.jp/tora0092-tech/archives/13978420.html
/var/www/html/TimeManager/public/.htaccess
1 <IfModule mod_rewrite.c> 2 <IfModule mod_negotiation.c> 3 Options -MultiViews -Indexes 4 </IfModule> 5 6 RewriteEngine On 7 8 # Handle Authorization Header 9 RewriteCond %{HTTP:Authorization} . 10 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 12 # Redirect Trailing Slashes If Not A Folder... 13 RewriteCond %{REQUEST_FILENAME} !-d 14 RewriteCond %{REQUEST_URI} (.+)/$ 15 RewriteRule ^ %1 [L,R=301] 16 17 # Send Requests To Front Controller... 18 RewriteCond %{REQUEST_FILENAME} !-d 19 RewriteCond %{REQUEST_FILENAME} !-f 20 RewriteRule ^ index.php [L] 21 </IfModule>
httpd.conf
httpd.conf
1 1 ServerRoot "/etc/httpd" 2 2 Listen 80 3 3 Include conf.modules.d/*.conf 4 4 User apache 5 5 Group apache 6 6 ServerAdmin root@localhost 7 7 <Directory /> 8 8 AllowOverride none 9 9 Require all denied 10 10 </Directory> 11 11 DocumentRoot "/var/www/html" 12 12 <Directory "/var/www"> 13 13 AllowOverride None 14 14 Require all granted 15 15 </Directory> 16 16 <Directory "/var/www/html"> 17 17 Options Indexes FollowSymLinks 18 18 AllowOverride None 19 19 Require all granted 20 20 </Directory> 21 21 <IfModule dir_module> 22 22 DirectoryIndex index.html 23 23 </IfModule> 24 24 <Files ".ht*"> 25 25 Require all denied 26 26 </Files> 27 27 ErrorLog "logs/error_log" 28 28 LogLevel warn 29 29 <IfModule log_config_module> 30 30 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 31 31 LogFormat "%h %l %u %t \"%r\" %>s %b" common 32 32 <IfModule logio_module> 33 33 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 34 34 </IfModule> 35 35 CustomLog "logs/access_log" combined 36 36 </IfModule> 37 37 <IfModule alias_module> 38 38 ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" 39 39 </IfModule> 40 40 <Directory "/var/www/cgi-bin"> 41 41 AllowOverride None 42 42 Options None 43 43 Require all granted 44 44 </Directory> 45 45 <IfModule mime_module> 46 46 TypesConfig /etc/mime.types 47 47 AddType application/x-compress .Z 48 48 AddType application/x-gzip .gz .tgz 49 49 AddType text/html .shtml 50 50 AddOutputFilter INCLUDES .shtml 51 51 </IfModule> 52 52 AddDefaultCharset UTF-8 53 53 <IfModule mime_magic_module> 54 54 MIMEMagicFile conf/magic 55 55 </IfModule> 56 56 EnableSendfile on 57 57 IncludeOptional conf.d/*.conf 58 58 Alias / "/var/www/html/TimeManager/public/" 59 59 <Directory "/var/www/html/TimeManager/public/"> 60 60 Options FollowSymLinks MultiViews 61 61 AllowOverride All 62 62 Order allow,deny 63 63 Allow from all 64 64 Require all granted 65 65 </Directory>
ご教示頂ければ幸いです。よろしくお願いいたします。
環境 Apache2.4
Centos7
PHP8
Laravel Framework 8.24.0
回答1件
あなたの回答
tips
プレビュー