Hi all
im new to use mongrel, my mongrel version is 1.1.4
and apache is 2.2.8
when i using apapche+mod_proxy+mongrel,
there are some error in my log file and make apache 502 prxoy error.
ex:
proxy: error reading status line from remote server localhost
proxy: Error reading from remote server returned by /test/show
But it works well if i access mongrel directly.
and the mongrel.log will have error like below:
then i try to put the REQUEST DATA into test_http11.rb, looks like
"Connection:
Keep-Alive\r\nGET /test/show HTTP/1.1\r\n " makes it confuse.
REQUEST DATA: “GET /test/show HTTP/1.1\r\nHost:
www.testkoji.com\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
zh-TW; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5\r\nAccept:
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\nAccept-Language:
zh-tw,en-us;q=0.7,en;q=0.3\r\nAccept-Encoding:
gzip,deflate\r\nAccept-Charset:
Big5,utf-8;q=0.7,;q=0.7\r\nX-Forwarded-For:
127.0.0.1\r\nX-Forwarded-Host: www.testkoji.com\r\nX-Forwarded-Server:
www.testkoji.com\r\nConnection: Keep-Alive\r\nGET /test/show
HTTP/1.1\r\nHost: www.testkoji.com\r\nUser-Agent: Mozilla/5.0 (Windows;
U;
Windows NT 5.1; zh-TW; rv:1.9b5) Gecko/2008032620
Firefox/3.0b5\r\nAccept:
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\nAccept-Language:
zh-tw,en-us;q=0.7,en;q=0.3\r\nAccept-Encoding:
gzip,deflate\r\nAccept-Charset:
Big5,utf-8;q=0.7,;q=0.7\r\nX-Forwarded-For:
127.0.0.1\r\nX-Forwarded-Host: www.testkoji.com\r\nX-Forwarded-Server:
www.testkoji.com\r\nConnection: Keep-Alive\r\n\r\n”
PARAMS: {“HTTP_X_FORWARDED_HOST”=>“www.testkoji.com”,
“HTTP_ACCEPT_ENCODING”=>“gzip,deflate”, “HTTP_USER_AGENT”=>“Mozilla/5.0
(Windows; U; Windows NT 5.1; zh-TW; rv:1.9b5) Gecko/2008032620
Firefox/3.0b5”, “HTTP_ACCEPT_LANGUAGE”=>“zh-tw,en-us;q=0.7,en;q=0.3”,
“HTTP_HOST”=>“www.testkoji.com”, “REQUEST_PATH”=>“/test/show”,
“HTTP_ACCEPT_CHARSET”=>“Big5,utf-8;q=0.7,;q=0.7",
“HTTP_VERSION”=>“HTTP/1.1”,
“HTTP_X_FORWARDED_SERVER”=>“www.testkoji.com”,
“REQUEST_URI”=>“/test/show”, “HTTP_X_FORWARDED_FOR”=>“127.0.0.1”,
“HTTP_ACCEPT”=>"text/html,application/xhtml+xml,application/xml;q=0.9,/*;q=0.8”,
“HTTP_CONNECTION”=>“Keep-Alive”, “REQUEST_METHOD”=>“GET”}