Portal Home > Knowledgebase > Articles Database > http / php 500 errors


http / php 500 errors




Posted by Chinese Democracy, 06-15-2009, 09:37 AM
On a cpanel / centos box: We are facing with a strange issue about URLs. At any web site in our reseller account in php pages when we add http:// or http%3A%2F%2F to the URL as a query string server returns Internal Server Error 500. For example when I try to access such page /index.php?q=http%3A%2F%2Fwww.google.com or /index.php?q=http://www.google.com I get this error. Is there any misconfiguration about PHP or Apache at server or what can we do to solve this problem? Server uses PHP 5.2.9 / apache 2.2

Posted by AquariusStorage, 06-15-2009, 09:40 AM
This sounds like a issue you would want to contact your provider about considering the fact that you are only a reseller and managing the server is the job of your provider, which should be the reason you go for a reseller account over a unmanaged VPS/Dedicated Server

Posted by 040Hosting, 06-15-2009, 09:41 AM
Are you using mod_security ? if so, you might have a rule blocking those requests.

Posted by Chinese Democracy, 06-15-2009, 09:41 AM
It was only a copy/paste (most of it) on behalf of a customer.

Posted by 040Hosting, 06-15-2009, 09:44 AM
As another note: it also seems your 'customer' is using a proxy, this is against the TOS of many providers, better check with your host if you are allowed to run a proxy.

Posted by Chinese Democracy, 06-15-2009, 09:48 AM
Where are the mod sec logs found? I completely forgot.

Posted by vecctormedia, 06-15-2009, 09:56 AM
var/log/httpd/*mod_sec* or /var/log/mod*

Posted by Chinese Democracy, 06-15-2009, 10:02 AM
Neither directories exist.

Posted by 040Hosting, 06-15-2009, 10:06 AM
try here on a cpanel server: /etc/httpd/logs

Posted by Sam Robertson, 06-15-2009, 10:07 AM
Do you have root access to the reseller server? If you don't have root access to it, you'll need to ask your provider for the mod_sec logs. If you do have root access, the logs may be in /usr/local/apache/logs/

Posted by Chinese Democracy, 06-15-2009, 03:10 PM
Found in mod sec logs: [Mon Jun 15 14:03:57 2009] [error] [client 208.74.121.102] ModSecurity: Access denied with code 500 (phase 2). Pattern match "(ht|f)tps?:/" at ARGS:url. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "152"] [hostname "www.clientdomain.com"] [uri "/script/script.php"] [unique_id "SjabHZPKQTIAAA8DytIAAAAA"] That line is: Is it safe to comment that one out, or another work around?

Posted by Chinese Democracy, 06-15-2009, 03:20 PM
Actually, for testing I removed that line and restarted apache. Still 500 error, and another "152" line error. SecRule ARGS "(ht|f)tps?:/" Removed that also, same error. So I realize it was the entire section causing the problem



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Spunkyhosting Down?! (Views: 805)
How to block msnbot (Views: 685)


Language: