Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've come to a very weird behavior of a web browser on android mobile phone (I've tried HTC Wildfire and HTC Desire phones).

I have a web server with Nginx v0.8.54. When i try to open a web page on the phone it shows me error:

The requested item could not be loaded! (Status code: 500)

BUT it only happens when I am requesting page through Mobile network. On Wifi it works just fine .... but there is more .... if I stop Nginx and start Apache web server it works just fine on both Mobile network and wifi. I've also tried other mobile network and it is the same behavior.

Some server stats:

  • Firewall is OFF
  • Selinux is OFF
  • the web page (using Nginx web server) opens normally on any other browser (IE, FF, Opera, Chrome, Safari) on the laptop or PC
  • Nothing in nginx error.log
  • This is the only entry in access.log when the page is requested:

    xxx.xxx.xxx.xxx - - [17/Mar/2011:11:19:49 -0500] 200 "GET / HTTP/1.1" 27405 "-" "Mozilla/5.0 (Linux; U; Android 2.2; en-gb; Desire_A8181 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" "-"

  • index.html has only "Hello World" string in it. There is no fishy javascript or anything else.

.... but there is even more....

if i open the same page on another server, with the same Nginx build, with the same server and web server configuration.... it opens just fine.

if anyone has any idea on what may be going on, i would really appreciate it if you let me know.

Thanks!

EDIT: i forgot to mention that page opens OK on Iphone and Nokia

share|improve this question
    
Could you be viewing a cached copy of the page on your phone? Is there anything in your Apache error.log? –  Steve Mayne Mar 18 '11 at 12:56
1  
nothing in apache error log... and i don't believe it is cached because it was never opened before. If you have android mobile phone i can give you the address and you can try it yourself –  Paxxil Mar 18 '11 at 13:01
    
Go for it - I have a Nexus One. –  Steve Mayne Mar 19 '11 at 10:54
    
174 dot 132 dot 177 dot 58; I've narrowed it down a little bit more.... it seems that it works on android 2.3 but doesn't on 2.2 –  Paxxil Mar 19 '11 at 17:27

1 Answer 1

Turn on debug_connection for your phone's IP(in nginx.conf) and send a test connection. I had issues like this when we started using nginx and it was related to the stock buffer/proxy settings being way too small for some of the larger requests made these days. It is possible the phone is sending a header that is way too large and you just need to bump up those settings in your .conf. If it isn't clear whats happening update the question with the debug_connection output from your sample request.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.