Your right, I’m an idiot. I was looking at the logs in the top level domain instead of api.fillesmag.com. However, from my own research (I may be wrong) the 500 internal server error and the 405 error can mean several things. I haven’t ruled out the web software since it hasn’t been tested with a server running VirtualMin, but it is powering several production apps.
Here is the error from the apache error log from this sub-server:
[Mon Apr 07 17:29:18 2014] [warn] [client 66.25.153.86] mod_fcgid: stderr: PHP Fatal error: Call to undefined function curl_init() in /home/fillesmag/domains/api.fillesmag.com/public_html/index.php on line 851
[Mon Apr 07 18:06:59 2014] [error] [client 80.218.68.77] script not found or unable to stat: /home/fillesmag/domains/api.fillesmag.com/cgi-bin/php
[Mon Apr 07 18:06:59 2014] [error] [client 80.218.68.77] script not found or unable to stat: /home/fillesmag/domains/api.fillesmag.com/cgi-bin/php5
[Mon Apr 07 18:07:00 2014] [error] [client 80.218.68.77] script not found or unable to stat: /home/fillesmag/domains/api.fillesmag.com/cgi-bin/php-cgi
[Mon Apr 07 18:07:00 2014] [error] [client 80.218.68.77] script not found or unable to stat: /home/fillesmag/domains/api.fillesmag.com/cgi-bin/php.cgi
[Mon Apr 07 18:07:00 2014] [error] [client 80.218.68.77] script not found or unable to stat: /home/fillesmag/domains/api.fillesmag.com/cgi-bin/php4
Here’s the block of code at line 851:
$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$response = curl_exec($ch);
$errno = curl_errno($ch);
$errmsg = curl_error($ch);
curl_close($ch);
Should there be cgi-bin in this folder? I’ve also come across that this error can be cgi files that aren’t properly configured or in the correct folder.
This is from the access log:
66.25.153.86 - - [03/Apr/2014:04:41:04 -0400] "GET /purchases/com.prismstudios.fillesmagazine/B88C837F-A662-44CC-B291-7CB0291CD4CD?environment=debug HTTP/1.1" 200 332 "-" "Filles%20Magazine/4.2.1 CFNetwork/672.1.13 Darwin/14.0.0"
66.25.153.86 - - [03/Apr/2014:04:42:19 -0400] "GET /issues/com.prismstudios.fillesmagazine/B88C837F-A662-44CC-B291-7CB0291CD4CD?environment=debug HTTP/1.1" 200 523 "-" "Filles%20Magazine/4.2.1 CFNetwork/672.1.13 Darwin/14.0.0"
66.25.153.86 - - [03/Apr/2014:04:42:19 -0400] "POST /confirmpurchase/com.prismstudios.fillesmagazine/B88C837F-A662-44CC-B291-7CB0291CD4CD HTTP/1.1" 500 267 "-" "Filles%20Magazine/4.2.1 CFNetwork/672.1.13 Darwin/14.0.0"
66.25.153.86 - - [03/Apr/2014:04:42:20 -0400] "POST /confirmpurchase/com.prismstudios.fillesmagazine/B88C837F-A662-44CC-B291-7CB0291CD4CD HTTP/1.1" 500 267 "-" "Filles%20Magazine/4.2.1 CFNetwork/672.1.13 Darwin/14.0.0"
66.25.153.86 - - [03/Apr/2014:04:42:20 -0400] "POST /confirmpurchase/com.prismstudios.fillesmagazine/B88C837F-A662-44CC-B291-7CB0291CD4CD HTTP/1.1" 500 267 "-" "Filles%20Magazine/4.2.1 CFNetwork/672.1.13 Darwin/14.0.0"
66.25.153.86 - - [03/Apr/2014:04:42:20 -0400] "POST /confirmpurchase/com.prismstudios.fillesmagazine/B88C837F-A662-44CC-B291-7CB0291CD4CD HTTP/1.1" 500 267 "-" "Filles%20Magazine/4.2.1 CFNetwork/672.1.13 Darwin/14.0.0"
These are the errors from the /var/log/apache2/error.log:
[Tue Apr 01 01:22:06 2014] [error] [client 66.25.153.86] Invalid method in request \x16\x03\x01
[Tue Apr 01 01:22:06 2014] [error] [client 66.25.153.86] Invalid method in request \x16\x03\x01
[Tue Apr 01 01:22:06 2014] [error] [client 66.25.153.86] Invalid method in request \x16\x03
[Tue Apr 01 01:22:17 2014] [error] [client 66.25.153.86] Invalid method in request \x16\x03\x01
[Tue Apr 01 01:22:17 2014] [error] [client 66.25.153.86] Invalid method in request \x16\x03\x01
[Tue Apr 01 01:22:17 2014] [error] [client 66.25.153.86] Invalid method in request \x16\x03