Skip to content

Instantly share code, notes, and snippets.

@dannysheehan
Created July 9, 2014 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannysheehan/03af98b3b9274bbbb1f6 to your computer and use it in GitHub Desktop.
Save dannysheehan/03af98b3b9274bbbb1f6 to your computer and use it in GitHub Desktop.
errors logs from website thumbnail services causing redirect loops for NGINX -> HAPROXY -> PHP5-FPM configuration
These are the errors of redirect issues i am having with *some* php based website thumbnail services thumbnailing my site.
## HAPROXY errors
~~~
[09/Jul/2014:10:27:33.724] backend www (#6) : invalid response
frontend www (#2), server php1 (#1), event #3
src 144.76.43.70:51530, session #380, session flags 0x000004ce
HTTP msg state 22, msg flags 0x00000000, tx flags 0x88600000
HTTP chunk len 0 bytes, HTTP body len 0 bytes
buffer flags 0x00008002, out 0 bytes, total 8192 bytes
pending 8192 bytes, wrapping at 16384, error at position 8192:
00000 HTTP/1.1 301 Moved Permanently\r\n
00032 Server: nginx\r\n
00047 Content-Type: text/html; charset=UTF-8\r\n
00087 Transfer-Encoding: chunked\r\n
00115 Connection: close\r\n
00134 X-Pingback: http://www.ftmon.org/xmlrpc.php\r\n
00179 Pragma: no-cache\r\n
00197 Location: http://www.ftmon.org/blog/nagios-notification-setup-testing/
00267+ ,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20htt
00337+ p:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.
00407+ ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.o
00477+ rg/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog
00547+ /nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios
00617+ -notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notifi
00687+ cation-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-
00757+ setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-t
00827+ esting/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/
00897+ ,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20ht
~~~
## haproxy.log
~~~
Jul 9 10:27:31 ns-ny haproxy[15997]: 144.76.43.70:51510 [09/Jul/2014:10:27:31.692] www www/php1 0/0/0/0/0 301 400 - - ---- 1/1/0/0/0 0/0 {ftmon.org|Mozilla/5.0 (Win||} {178} "GET /blog/nagios-notification-setup-testing HTTP/1.1"
Jul 9 10:27:32 ns-ny haproxy[15997]: Connect from 127.0.0.1:58966 to 127.0.0.1:3306 (mysql/TCP)
Jul 9 10:27:32 ns-ny haproxy[15997]: 144.76.43.70:51530 [09/Jul/2014:10:27:32.035] www www/php1 0/0/0/180/180 301 443 - - ---- 2/2/0/0/0 0/0 {www.ftmon.org|Mozilla/5.0 (Win||} {} "GET /blog/nagios-notification-setup-testing HTTP/1.1"
Jul 9 10:27:32 ns-ny haproxy[15997]: Connect from 127.0.0.1:58972 to 127.0.0.1:3306 (mysql/TCP)
Jul 9 10:27:32 ns-ny haproxy[15997]: 144.76.43.70:51530 [09/Jul/2014:10:27:32.215] www www/php1 96/0/0/141/237 301 604 - - ---- 2/2/0/0/0 0/0 {www.ftmon.org|Mozilla/5.0 (Win||} {} "GET /blog/nagios-notification-setup-testing/,%20http://www.ftmon.org/blog/nagios-notification-setup-testing/ HTTP/1.1"
Jul 9 10:27:32 ns-ny haproxy[15997]: Connect from 127.0.0.1:58978 to 127.0.0.1:3306 (mysql/TCP)
Jul 9 10:27:32 ns-ny haproxy[15997]: 144.76.43.70:51530 [09/Jul/2014:10:27:32.452] www www/php1 96/0/0/148/244 301 856 - - ---- 2/2/0/0/0 0/0 {www.ftmon.org|Mozilla/5.0 (Win||} {} "GET /blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http://www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/ HTTP/1.1"
Jul 9 10:27:32 ns-ny haproxy[15997]: Connect from 127.0.0.1:58984 to 127.0.0.1:3306 (mysql/TCP)
Jul 9 10:27:32 ns-ny haproxy[15997]: 144.76.43.70:51530 [09/Jul/2014:10:27:32.697] www www/php1 96/0/0/146/242 301 1360 - - ---- 2/2/0/0/0 0/0 {www.ftmon.org|Mozilla/5.0 (Win||} {} "GET /blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http://www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/ HTTP/1.1"
~~~
## access.log -- note there is nothing in my error.log
~~~
144.76.43.70 - - [09/Jul/2014:10:27:32 +0100] "GET /blog/nagios-notification-setup-testing HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
144.76.43.70 - - [09/Jul/2014:10:27:32 +0100] "GET /blog/nagios-notification-setup-testing/,%20http://www.ftmon.org/blog/nagios-notification-setup-testing/ HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
144.76.43.70 - - [09/Jul/2014:10:27:32 +0100] "GET /blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http://www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/ HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
144.76.43.70 - - [09/Jul/2014:10:27:32 +0100] "GET /blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http://www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/,%20http:/www.ftmon.org/blog/nagios-notification-setup-testing/ HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment