Project

General

Profile

[Invalid] Different behaviour when downloading from localhost or external ip

Added by MaurizioB over 4 years ago

I've setup lighttpd a couple of days ago, tested locally and working perfectly.
Today I asked a friend of mine to check on my work and we realized that image are not downloaded correctly (while text/html is). It looks like the same happens for plain text files, which are downloaded as "encoded".
It turns out that if I download the files locally, using 127.0.0.1 or localhost, everything works fine; if I use my external ip (both from my local network and from any external computer), everything except html files is scrambled.

This is my actual lighttpd.conf file: https://bpaste.net/show/a34533808add

I tried disabling fastcgi.server, disabling the rewrite rules, I checked both files with md5 and sha256, tried different file types, with different browser, disabling cache, using curl and wget. Also file sizes match, I checked the headers (curl outputs: https://bpaste.net/show/b9db06c84633) and the error.log (https://bpaste.net/show/123a5f1f28c0), I disabled the external firewall on my router, tested with another server (cherokee, which doesn't show this issue, as far as I can tell).

Maybe I'm just doing something (really stupid and) wrong, you never know. I'm attaching the 2 files downloaded with curl.

Does anybody have a suggestion, please?

Thank you in advance,
MaurizioB

external.png (77.4 KB) external.png test.png downloaded using the external ip
internal.png (77.4 KB) internal.png same file downloaded using localhost/127.0.0.1