apache-2.2 – Fixing 500 Error Only in Chrome (Works in Firefox)

apache-2.2PHP

I have a website that send a 500 server error only in chrome. This is a php website that use apache. Nothing appears in the log.

I tried to go to the website with firefox, on a mobile phone and with http://browsershots.org/ and it works but It doesn't work with chrome. I tried with 3 os on 3 computers.

I have other websites that works on the same server.

I tried to remove the website and replace it by an blank index.html page, it works with Firefox but I still have a 500 error with chrome. I guess there is an error with the apache configuration but there is nothing special in it :

<VirtualHost *:80>
DocumentRoot "/var/www/html/mysite.ca/www.mysite.ca"
ServerName mysite.ca
<Directory "/var/www/html/mysite.ca/www.mysite.ca">
allow from all
Options +Indexes
</Directory>
ServerAlias www.mysite.ca
</VirtualHost>

The website was hacked but I cleaned all strange injected code and I restored the database to a working version. Anyway, the problem does not seem to come from the code.

I have no more ideas. Do you have one ?

Edit

Here is what I receive from wget :

--2016-12-07 09:18:30--  http://mysite.ca/
Résolution de mysite (mysite.ca)… 2600:3c03::..., 123.123.123.123
Connexion à mysite.ca (mysite.ca)|2600:3c03::...|:80… connecté.
requête HTTP transmise, en attente de la réponse… 500 Internal Server Error
2016-12-07 09:18:30 erreur 500 : Internal Server Error.

Best Answer

Try inspecting the http response from the Chrome Dev tools. What kind of response do you get back from Apache?

You might also try temporarily replacing the config file of your Apache with one from scratch. That might help track down the problem.

Also check the Apache logs. You should be able to find useful information relating to the http request there.