Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed Apache on a Raspberry Pi. If I create a js file in /var/www with nano, it works fine, and is served correctly if I open http://x.x.x.x/test.js directly in a browser. However, if I copy any .js or .gif file from an external source, e.g.

sudo wget
sudo wget -o puppy.gif

, when I try to access these file, e.g. at http://x.x.x.x/puppy.gif, it just spins forever and the page never loads.

I can't figure out why it's able to serve the test.js file that I created with nano but not jquery-2.0.0.min.js or puppy.gif. The permissions are the same for all of these files (rw-r--r--).

-rw-r--r-- 1 root root   83095 Apr 18 15:52 jquery-2.0.0.min.js
-rw-r--r-- 1 root root    6071 Apr 20 08:42 puppy.gif
-rw-r--r-- 1 root root  102400 Apr 20 08:19 test.js

At first I though it related to the filesize, but it didn't have any problem serving a 100K test.js that I made with

sudo dd if=/dev/zero bs=1K count=100 of=test.js

Access log (again /test.js is served successfully but for /puppy.gif and /jquery-2.0.0.min.js the page never loads): - - [20/Apr/2013:09:31:45 -0500] "GET /puppy.gif HTTP/1.1" 200 6363 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31" - - [20/Apr/2013:09:31:56 -0500] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)" - - [20/Apr/2013:09:33:22 -0500] "GET /test.js HTTP/1.1" 304 212 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31"

There's nothing in the error log. Strangely nothing is logged for requests for /jquery-2.0.0.min.js.

Update: I decided to start over; I re-flashed my SD card and decided to try Nginx instead of Apache, but I'm having the same issue. I've noticed that everything is served successfully on localhost (if I access it from the browser on the rpi).

I've found that externally, a tiny 539 byte 16x16 png image is served successfully (though wireshark indicates the packet is malformed) but a larger png image is not served successfully. 
    sad.png (539 bytes)
    penguin.png (528 KB)
    GET_sad.png_succeeds.pcap (shows malformed packet, but works)
    GET_penguin.png_fails.pcap (request is not successful)

My RPi is and my PC (client) is

share|improve this question
What's the mem usage when you're trying to access these files, or even when the Pi is "resting"? – cutrightjm Apr 20 '13 at 14:12
KiB Mem: 448776 total, 238628 used, 210148 free, 46996 buffers – zobdos Apr 20 '13 at 14:29

Your Answer


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

Browse other questions tagged or ask your own question.