How to debug these internal server errors?

I am not a server admin but do have some experience with Linux servers but mostly in Django and Nginx. Someone at our company has left suddenly for personal reasons and we have a site running on PHP with two pages that are showing internal server error messages that I need to fix.

I have done a fair bit of searching here and on Google and tried a few things already but still stuck, these are the urls to the pages (domain removed):

http://dev.mydomain.com/user/login/index.php

http://dev.mydomain.com/ew-admin/submit.php

I first did a grep search for the index.php url in the Apache error logs and found this:

[Fri Mar 10 06:15:51.083887 2017] [core:error] [pid 24087]    [client 121.97.206.98:54740] 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://dev.mydomain.com/user/login/index.php

and then after Googling those errors I found this thread:

https://stackoverflow.com/questions/19071324/request-exceeded-the-limit-of-10-internal-redirects

this is my .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

and I tried adding the line that was suggested in the SO thread to the .htaccess file but that didnt seem to change anything.

So next I checked the file and folder permissions for where those files are stored, they weren't set to 755 so I changed them to that, still getting internal server error though.

I should all that the public_html/ directory has these two directories in them:

dev/ old_mydomain/dev

the dev/ directory is empty and old_mydomain/dev directory seems to have the files for these two urls that are showing errors so I tried moving all the files from old_mydomain/dev to the empty dev/ directory seeing as the url has the 'dev.' subdomain but that didnt work either so I moved the files back.

I found an error_log within the old_mydomain/dev directory too with the following in but this seems to have stopped logging errors in the summer of last year and I know that these two urls were working just a few months back:

[21-Jul-2016 11:45:20 UTC] PHP Warning:  fsockopen(): unable to connect to toolbarqueries.google.com:80 (Network is unreachable) in /home/mydomain/public_html/dev/pagerank.php on line 85
[29-Jul-2016 06:03:09 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/mydomain/public_html/dev/hide/init.php on line 14
[30-Jul-2016 13:22:40 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/mydomain/public_html/dev/hide/init.php on line 14
[31-Jul-2016 10:38:20 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/mydomain/public_html/dev/hide/init.php on line 14
[07-Aug-2016 13:32:34 UTC] PHP Warning:  fsockopen(): unable to connect to toolbarqueries.google.com:80 (Network is unreachable) in /home/mydomain/public_html/dev/pagerank.php on line 85
[08-Aug-2016 20:37:55 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/mydomain/public_html/dev/hide/init.php on line 14
[09-Aug-2016 23:58:17 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/eatonweb/public_html/dev/hide/init.php on line 14
[11-Aug-2016 00:04:53 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/mydomain/public_html/dev/hide/init.php on line 14
[16-Aug-2016 22:27:06 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/mydomain/public_html/dev/hide/init.php on line 14
[17-Aug-2016 23:57:40 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/mydomain/public_html/dev/hide/init.php on line 14 

Thats all I can think of for debugging and Im stumped right now, any help would be appreciated!

-1
задан 23 May 2017 в 15:41
1 ответ

Итак, нашли проблему с некоторой помощью, кажется, что в dev.mydomain.com не было файла .htaccess, так что .htaccess в корне использовался, который был настроен по-другому, и это привело к ошибкам сервера.

.
0
ответ дан 5 December 2019 в 20:25

Теги

Похожие вопросы